Skip to content

Use EXPECT_FALSE instead of EXPECT_EQ(false, X) #752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Apr 6, 2017
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
Next Next commit
Use EXPECT_FALSE instead of EXPECT_EQ(false, X)
This fixes the failures we're finding from the CI builds.
  • Loading branch information
deanberris committed Apr 6, 2017
commit ea148313318111cd1dd433bec376bd29c7899d25
10 changes: 5 additions & 5 deletions libs/network/test/http/request_incremental_parser_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ TEST(IncrementalRequestParserTest, ParseMethod) {
p.reset();
std::tie(parsed_ok, result_range) =
p.parse_until(request_parser_type::method_done, invalid_http_method);
EXPECT_EQ(false, parsed_ok);
EXPECT_FALSE(parsed_ok);
parsed.assign(std::begin(result_range), std::end(result_range));
std::cout << "PARSED: " << parsed << " [state:" << p.state() << "] "
<< std::endl;
Expand All @@ -68,7 +68,7 @@ TEST(IncrementalRequestParserTest, ParseURI) {
std::string valid_http_request = "GET / HTTP/1.1\r\n";
std::tie(parsed_ok, result_range) =
p.parse_until(request_parser_type::uri_done, valid_http_request);
EXPECT_EQ(true, parsed_ok);
EXPECT_TRUE(parsed_ok);
EXPECT_FALSE(boost::empty(result_range));
std::string parsed(std::begin(result_range), std::end(result_range));
std::cout << "PARSED: " << parsed << " [state:" << p.state() << "] "
Expand All @@ -78,7 +78,7 @@ TEST(IncrementalRequestParserTest, ParseURI) {
p.reset();
std::tie(parsed_ok, result_range) =
p.parse_until(request_parser_type::uri_done, invalid_http_request);
EXPECT_EQ(false, parsed_ok);
EXPECT_FALSE(parsed_ok);
parsed.assign(std::begin(result_range), std::end(result_range));
std::cout << "PARSED: " << parsed << " [state:" << p.state() << "] "
<< std::endl;
Expand All @@ -104,7 +104,7 @@ TEST(IncrementalRequestParserTest, ParseHTTPVersion) {
p.reset();
std::tie(parsed_ok, result_range) =
p.parse_until(request_parser_type::version_done, invalid_http_request);
EXPECT_EQ(false, parsed_ok);
EXPECT_FALSE(parsed_ok);
parsed.assign(std::begin(result_range), std::end(result_range));
std::cout << "PARSED: " << parsed << " [state:" << p.state() << "] "
<< std::endl;
Expand All @@ -121,7 +121,7 @@ TEST(IncrementalRequestParserTest, ParseHTTPHeaders) {
"GET / HTTP/1.1\r\nHost: cpp-netlib.org\r\n\r\n";
std::tie(parsed_ok, result_range) =
p.parse_until(request_parser_type::headers_done, valid_http_request);
EXPECT_EQ(true, parsed_ok);
EXPECT_TRUE(parsed_ok);
EXPECT_FALSE(boost::empty(result_range));
std::string parsed(std::begin(result_range), std::end(result_range));
std::cout << "PARSED: " << parsed << " [state:" << p.state() << "] "
Expand Down