Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions test/unit/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1272,11 +1272,11 @@ struct parser_test
}
if(pr_->is_complete())
{
BOOST_TEST_EQ(pr_->body(), sb_);
BOOST_TEST(pr_->body() == sb_);
// this should be a no-op
read(*pr_, in, ec);
BOOST_TEST(! ec.failed());
BOOST_TEST_EQ(pr_->body(), sb_);
BOOST_TEST(pr_->body() == sb_);
return;
}
read(*pr_, in, ec);
Expand All @@ -1288,11 +1288,11 @@ struct parser_test
}
if(! BOOST_TEST(pr_->is_complete()))
return;
BOOST_TEST_EQ(pr_->body(), sb_);
BOOST_TEST(pr_->body() == sb_);
// this should be a no-op
read(*pr_, in, ec);
BOOST_TEST(! ec.failed());
BOOST_TEST_EQ(pr_->body(), sb_);
BOOST_TEST(pr_->body() == sb_);
}

void
Expand Down Expand Up @@ -1325,13 +1325,13 @@ struct parser_test
if(! BOOST_TEST(pr_->is_complete()))
return;
}
BOOST_TEST_EQ(
test_to_string(fb.data()), sb_);
BOOST_TEST(
test_to_string(fb.data()) == sb_);
// this should be a no-op
read(*pr_, in, ec);
BOOST_TEST(! ec.failed());
BOOST_TEST_EQ(
test_to_string(fb.data()), sb_);
BOOST_TEST(
test_to_string(fb.data()) == sb_);
}

void
Expand Down Expand Up @@ -1362,11 +1362,11 @@ struct parser_test
if(! BOOST_TEST(pr_->is_complete()))
return;
}
BOOST_TEST_EQ(ts.s, sb_);
BOOST_TEST(ts.s == sb_);
// this should be a no-op
read(*pr_, in, ec);
BOOST_TEST(! ec.failed());
BOOST_TEST_EQ(ts.s, sb_);
BOOST_TEST(ts.s == sb_);
}


Expand Down Expand Up @@ -1642,7 +1642,7 @@ struct parser_test
BOOST_TEST(pr.is_complete());

auto str = pr.body();
BOOST_TEST_EQ(str, "hello, world!");
BOOST_TEST(str == "hello, world!");
}

{
Expand Down Expand Up @@ -1674,7 +1674,7 @@ struct parser_test
read(pr, in2, ec);
BOOST_TEST(! ec.failed());
BOOST_TEST(pr.is_complete());
BOOST_TEST_EQ(pr.body(), "hello, world!");
BOOST_TEST(pr.body() == "hello, world!");
}

{
Expand Down Expand Up @@ -1755,9 +1755,9 @@ struct parser_test
system::error_code ec;
read(pr, in, ec);
BOOST_TEST(pr.is_complete());
BOOST_TEST_EQ(
pr.body(),
"hello, world! and this is a much longer string of text");
BOOST_TEST(
pr.body() ==
"hello, world! and this is a much longer string of text");
}

{
Expand Down Expand Up @@ -1841,9 +1841,9 @@ struct parser_test

read(pr, in, ec);
BOOST_TEST(pr.is_complete());
BOOST_TEST_EQ(
pr.body(),
"hello, world! and this is a much longer string of text");
BOOST_TEST(
pr.body() ==
"hello, world! and this is a much longer string of text");
}
}
}
Expand Down
17 changes: 7 additions & 10 deletions test/unit/serializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ struct serializer_test

if( chunk_size == 0 ) // last chunk
{
BOOST_TEST_EQ(chunked_body, "\r\n");
BOOST_TEST_EQ(chunked_body.size(), 2);
BOOST_TEST(chunked_body == "\r\n");
chunked_body.remove_prefix(2);
break;
}
Expand Down Expand Up @@ -229,7 +228,7 @@ struct serializer_test
serializer sr(ctx);
sr.start(res);
std::string s = read(sr);
BOOST_TEST_EQ(s, expected);
BOOST_TEST(s == expected);
};

check(
Expand Down Expand Up @@ -481,8 +480,8 @@ struct serializer_test
"Content-Length: 2048\r\n"
"\r\n";

BOOST_TEST_EQ(
s.substr(0, header.size()), header);
BOOST_TEST(
s.substr(0, header.size()) == header);
BOOST_TEST(s ==
"HTTP/1.1 200 OK\r\n"
"Server: test\r\n"
Expand Down Expand Up @@ -623,8 +622,8 @@ struct serializer_test
s.starts_with(expected_header));

s.remove_prefix(expected_header.size());
BOOST_TEST_EQ(
s, std::string(13370, '*'));
BOOST_TEST(
s == std::string(13370, '*'));
});
}

Expand Down Expand Up @@ -800,9 +799,7 @@ struct serializer_test
mcbs = sr.prepare();
std::string body;
append(body, *mcbs);
BOOST_TEST_EQ(
"0\r\n\r\n",
body);
BOOST_TEST(body == "0\r\n\r\n");
sr.consume(5);

BOOST_TEST(sr.is_done());
Expand Down
4 changes: 2 additions & 2 deletions test/unit/zlib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ struct zlib_test
core::string_view sv2(
reinterpret_cast<char const*>(
decompressed_output.data()), n);
BOOST_TEST_EQ(sv2, expected);
BOOST_TEST(sv2 == expected);

::inflateEnd(&zs);
return;
Expand Down Expand Up @@ -464,7 +464,7 @@ struct zlib_test

if( chunk_size == 0 )
{
BOOST_TEST_EQ(chunk, "\r\n");
BOOST_TEST(chunk == "\r\n");
}
else
{
Expand Down
Loading