Files
beast/test/core/bind_handler.cpp
Vinnie Falco 51aa614a10 Tidy up tests and docs:
* Add handler_ptr test and increase coverage
* Add test for prepare_buffer
* Move is_call_possible tests to a .cpp file
* Tidy up docs and declarations
2017-07-20 08:12:14 -07:00

38 lines
790 B
C++

//
// Copyright (c) 2013-2016 Vinnie Falco (vinnie dot falco at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Test that header file is self-contained.
#include <beast/core/bind_handler.hpp>
#include <beast/unit_test/suite.hpp>
#include <functional>
namespace beast {
class bind_handler_test : public unit_test::suite
{
public:
void
callback(int v)
{
BEAST_EXPECT(v == 42);
}
void run()
{
auto f = bind_handler(std::bind(
&bind_handler_test::callback, this,
std::placeholders::_1), 42);
f();
pass();
}
};
BEAST_DEFINE_TESTSUITE(bind_handler,core,beast);
} // beast