Add BEAST_EXPECT macro:

This macro is used in the unit test framework to assist in
reporting the file and line number of test failures.
This commit is contained in:
Vinnie Falco
2016-08-03 15:34:23 -04:00
parent 1537527927
commit 8d9c0daa9d
29 changed files with 573 additions and 565 deletions

View File

@@ -20,13 +20,13 @@ public:
void check(char const* name, error ev)
{
auto const ec = make_error_code(ev);
expect(std::string{ec.category().name()} == name);
expect(! ec.message().empty());
expect(std::addressof(ec.category()) ==
BEAST_EXPECT(std::string{ec.category().name()} == name);
BEAST_EXPECT(! ec.message().empty());
BEAST_EXPECT(std::addressof(ec.category()) ==
std::addressof(detail::get_error_category()));
expect(detail::get_error_category().equivalent(static_cast<int>(ev),
BEAST_EXPECT(detail::get_error_category().equivalent(static_cast<int>(ev),
ec.category().default_error_condition(static_cast<int>(ev))));
expect(detail::get_error_category().equivalent(
BEAST_EXPECT(detail::get_error_category().equivalent(
ec, static_cast<int>(ev)));
}