2017-07-20 08:01:46 -07:00
|
|
|
//
|
|
|
|
|
// 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/bind_handler.hpp>
|
|
|
|
|
|
2016-05-06 19:14:17 -04:00
|
|
|
#include <beast/unit_test/suite.hpp>
|
2017-07-20 08:01:46 -07:00
|
|
|
#include <functional>
|
|
|
|
|
|
|
|
|
|
namespace beast {
|
|
|
|
|
|
2016-05-06 19:14:17 -04:00
|
|
|
class bind_handler_test : public unit_test::suite
|
2017-07-20 08:01:46 -07:00
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
static void foo (int)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void run()
|
|
|
|
|
{
|
|
|
|
|
auto f (bind_handler (
|
|
|
|
|
std::bind (&foo, std::placeholders::_1),
|
|
|
|
|
42));
|
|
|
|
|
f();
|
|
|
|
|
pass();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
BEAST_DEFINE_TESTSUITE(bind_handler,core,beast);
|
|
|
|
|
|
|
|
|
|
} // beast
|