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
This commit is contained in:
Vinnie Falco
2017-07-20 08:12:14 -07:00
parent 7ef72b6ebc
commit 51aa614a10
19 changed files with 372 additions and 136 deletions
+6 -4
View File
@@ -16,15 +16,17 @@ namespace beast {
class bind_handler_test : public unit_test::suite
{
public:
static void foo (int)
void
callback(int v)
{
BEAST_EXPECT(v == 42);
}
void run()
{
auto f (bind_handler (
std::bind (&foo, std::placeholders::_1),
42));
auto f = bind_handler(std::bind(
&bind_handler_test::callback, this,
std::placeholders::_1), 42);
f();
pass();
}