Commit fea92be9 authored by Jim Meyering's avatar Jim Meyering Committed by Facebook Github Bot

change EXPECT_EQ(false, ... to EXPECT_FALSE(...; ditto for true/EXPECT_TRUE

Summary:
Change every instance of EXPECT_EQ(false, ... to the simpler/shorter EXPECT_FALSE(...
Likewise, convert each EXPECT_EQ(true, ... to EXPECT_TRUE(...

Differential Revision: D5019004

fbshipit-source-id: 0203f10fa47237f869a75a057ac4456ef03e1f53
parent 6b1a43fd
......@@ -153,10 +153,11 @@ TEST(ApplyTuple, Test) {
folly::applyTuple(
static_cast<int (Overloaded::*)(int)>(&Overloaded::func),
std::make_tuple(&ovl, 12)));
EXPECT_EQ(true,
folly::applyTuple(
static_cast<bool (Overloaded::*)(bool)>(&Overloaded::func),
std::make_tuple(&ovl, false)));
EXPECT_EQ(
/* do not code-mode to EXPECT_TRUE */ true,
folly::applyTuple(
static_cast<bool (Overloaded::*)(bool)>(&Overloaded::func),
std::make_tuple(&ovl, false)));
int x = folly::applyTuple(std::plus<int>(), std::make_tuple(12, 12));
EXPECT_EQ(24, x);
......
......@@ -494,13 +494,13 @@ TEST(ExceptionWrapper, handle_std_exception) {
};
expect_runtime_error_yes_catch_all(ew_eptr);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
expect_runtime_error_yes_catch_all(ew_small);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
expect_runtime_error_yes_catch_all(ew_big);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
auto expect_runtime_error_no_catch_all = [&](const exception_wrapper& ew) {
......@@ -511,13 +511,13 @@ TEST(ExceptionWrapper, handle_std_exception) {
};
expect_runtime_error_no_catch_all(ew_eptr);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
expect_runtime_error_no_catch_all(ew_small);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
expect_runtime_error_no_catch_all(ew_big);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
auto expect_runtime_error_catch_non_std = [&](const exception_wrapper& ew) {
......@@ -529,13 +529,13 @@ TEST(ExceptionWrapper, handle_std_exception) {
};
expect_runtime_error_catch_non_std(ew_eptr);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
expect_runtime_error_catch_non_std(ew_small);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
expect_runtime_error_catch_non_std(ew_big);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
// Test that an exception thrown from one handler is not caught by an
......@@ -551,13 +551,13 @@ TEST(ExceptionWrapper, handle_std_exception) {
};
EXPECT_THROW(expect_runtime_error_rethrow(ew_eptr), std::runtime_error);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
EXPECT_THROW(expect_runtime_error_rethrow(ew_small), std::runtime_error);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
EXPECT_THROW(expect_runtime_error_rethrow(ew_big), std::runtime_error);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
}
TEST(ExceptionWrapper, handle_std_exception_unhandled) {
......@@ -574,10 +574,10 @@ TEST(ExceptionWrapper, handle_std_exception_unhandled) {
};
expect_runtime_error_yes_catch_all(ew_eptr);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
expect_runtime_error_yes_catch_all(ew_small);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
}
TEST(ExceptionWrapper, handle_non_std_exception_small) {
......@@ -594,13 +594,13 @@ TEST(ExceptionWrapper, handle_non_std_exception_small) {
};
expect_int_yes_catch_all(ew_eptr1);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
expect_int_yes_catch_all(ew_eptr2);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
expect_int_yes_catch_all(ew_small);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
auto expect_int_no_catch_all = [&](const exception_wrapper& ew) {
......@@ -610,13 +610,13 @@ TEST(ExceptionWrapper, handle_non_std_exception_small) {
};
expect_int_no_catch_all(ew_eptr1);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
expect_int_no_catch_all(ew_eptr2);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
expect_int_no_catch_all(ew_small);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
auto expect_int_no_catch_all_2 = [&](const exception_wrapper& ew) {
......@@ -626,13 +626,13 @@ TEST(ExceptionWrapper, handle_non_std_exception_small) {
};
expect_int_no_catch_all_2(ew_eptr1);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
expect_int_no_catch_all_2(ew_eptr2);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
expect_int_no_catch_all_2(ew_small);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
}
TEST(ExceptionWrapper, handle_non_std_exception_big) {
......@@ -649,13 +649,13 @@ TEST(ExceptionWrapper, handle_non_std_exception_big) {
};
expect_int_yes_catch_all(ew_eptr1);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
expect_int_yes_catch_all(ew_eptr2);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
expect_int_yes_catch_all(ew_big);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
auto expect_int_no_catch_all = [&](const exception_wrapper& ew) {
......@@ -665,13 +665,13 @@ TEST(ExceptionWrapper, handle_non_std_exception_big) {
};
expect_int_no_catch_all(ew_eptr1);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
expect_int_no_catch_all(ew_eptr2);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
expect_int_no_catch_all(ew_big);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
auto expect_int_no_catch_all_2 = [&](const exception_wrapper& ew) {
......@@ -681,13 +681,13 @@ TEST(ExceptionWrapper, handle_non_std_exception_big) {
};
expect_int_no_catch_all_2(ew_eptr1);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
expect_int_no_catch_all_2(ew_eptr2);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
expect_int_no_catch_all_2(ew_big);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
EXPECT_THROW(
......@@ -705,7 +705,7 @@ TEST(ExceptionWrapper, handle_non_std_exception_rethrow_base_derived) {
},
[](const BaseException&) { EXPECT_TRUE(false); }),
DerivedException);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
handled = false;
EXPECT_THROW(
ew.handle(
......@@ -715,7 +715,7 @@ TEST(ExceptionWrapper, handle_non_std_exception_rethrow_base_derived) {
},
[](...) { EXPECT_TRUE(false); }),
DerivedException);
EXPECT_EQ(true, handled);
EXPECT_TRUE(handled);
}
TEST(ExceptionWrapper, self_swap_test) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment