mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
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:
@@ -32,8 +32,8 @@ public:
|
||||
dynabuf_readstream<socket_type, streambuf> srs(ios);
|
||||
dynabuf_readstream<socket_type, streambuf> srs2(std::move(srs));
|
||||
srs = std::move(srs2);
|
||||
expect(&srs.get_io_service() == &ios);
|
||||
expect(&srs.get_io_service() == &srs2.get_io_service());
|
||||
BEAST_EXPECT(&srs.get_io_service() == &ios);
|
||||
BEAST_EXPECT(&srs.get_io_service() == &srs2.get_io_service());
|
||||
}
|
||||
{
|
||||
socket_type sock(ios);
|
||||
@@ -63,11 +63,11 @@ public:
|
||||
boost::asio::read(srs, buffer(&s[0], s.size()), ec);
|
||||
if(! ec)
|
||||
{
|
||||
expect(s == "Hello, world!");
|
||||
BEAST_EXPECT(s == "Hello, world!");
|
||||
break;
|
||||
}
|
||||
}
|
||||
expect(n < limit);
|
||||
BEAST_EXPECT(n < limit);
|
||||
|
||||
for(n = 0; n < limit; ++n)
|
||||
{
|
||||
@@ -82,11 +82,11 @@ public:
|
||||
boost::asio::read(srs, buffer(&s[0], s.size()), ec);
|
||||
if(! ec)
|
||||
{
|
||||
expect(s == "Hello, world!");
|
||||
BEAST_EXPECT(s == "Hello, world!");
|
||||
break;
|
||||
}
|
||||
}
|
||||
expect(n < limit);
|
||||
BEAST_EXPECT(n < limit);
|
||||
|
||||
for(n = 0; n < limit; ++n)
|
||||
{
|
||||
@@ -101,11 +101,11 @@ public:
|
||||
srs, buffer(&s[0], s.size()), do_yield[ec]);
|
||||
if(! ec)
|
||||
{
|
||||
expect(s == "Hello, world!");
|
||||
BEAST_EXPECT(s == "Hello, world!");
|
||||
break;
|
||||
}
|
||||
}
|
||||
expect(n < limit);
|
||||
BEAST_EXPECT(n < limit);
|
||||
|
||||
for(n = 0; n < limit; ++n)
|
||||
{
|
||||
@@ -121,11 +121,11 @@ public:
|
||||
srs, buffer(&s[0], s.size()), do_yield[ec]);
|
||||
if(! ec)
|
||||
{
|
||||
expect(s == "Hello, world!");
|
||||
BEAST_EXPECT(s == "Hello, world!");
|
||||
break;
|
||||
}
|
||||
}
|
||||
expect(n < limit);
|
||||
BEAST_EXPECT(n < limit);
|
||||
}
|
||||
|
||||
void run() override
|
||||
|
||||
Reference in New Issue
Block a user