change EXPECT_EQ(false, ... to EXPECT_FALSE(...; ditto for ASSERT_EQ
authorJim Meyering <meyering@fb.com>
Thu, 23 Mar 2017 17:18:49 +0000 (10:18 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 23 Mar 2017 17:20:26 +0000 (10:20 -0700)
Summary:
Change every instance of EXPECT_EQ(false, ... to the simpler/shorter EXPECT_FALSE(...
Do the same for ASSERT_EQ, for consistency, and for true/TRUE.

Reviewed By: Orvid

Differential Revision: D4751397

fbshipit-source-id: 045293dbf8be1167f0cb1b85a2f9cd59a6a30f73

folly/io/async/test/EventBaseTest.cpp
folly/io/test/IOBufCursorTest.cpp
folly/test/DynamicConverterTest.cpp
folly/test/DynamicTest.cpp

index 6724bae..01157f9 100644 (file)
@@ -1651,7 +1651,7 @@ TEST(EventBaseTest, EventBaseThreadLoop) {
   });
   base.loop();
 
-  ASSERT_EQ(true, ran);
+  ASSERT_TRUE(ran);
 }
 
 TEST(EventBaseTest, EventBaseThreadName) {
index 89e1205..36e3ab5 100644 (file)
@@ -142,7 +142,7 @@ TEST(IOBuf, Cursor) {
   c.write((uint8_t)40); // OK
   try {
     c.write((uint8_t)10); // Bad write, checked should except.
-    EXPECT_EQ(true, false);
+    EXPECT_TRUE(false);
   } catch (...) {
   }
 }
index 4716503..152eba7 100644 (file)
@@ -296,11 +296,11 @@ TEST(DynamicConverter, consts) {
 
   dynamic d3 = true;
   auto i3 = convertTo<const bool>(d3);
-  EXPECT_EQ(true, i3);
+  EXPECT_TRUE(i3);
 
   dynamic d4 = "true";
   auto i4 = convertTo<const bool>(d4);
-  EXPECT_EQ(true, i4);
+  EXPECT_TRUE(i4);
 
   dynamic d5 = dynamic::array(1, 2);
   auto i5 = convertTo<const std::pair<const int, const int>>(d5);
index ff60856..fe34904 100644 (file)
@@ -440,10 +440,10 @@ TEST(Dynamic, GetSmallThings) {
   EXPECT_EQ(6.0, ddouble.getDouble());
   EXPECT_EQ(5.0, std::move(mdouble).getDouble());
 
-  EXPECT_EQ(true, cbool.getBool());
+  EXPECT_TRUE(cbool.getBool());
   dbool.getBool() = false;
   EXPECT_FALSE(dbool.getBool());
-  EXPECT_EQ(true, std::move(mbool).getBool());
+  EXPECT_TRUE(std::move(mbool).getBool());
 }
 
 TEST(Dynamic, At) {