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 6724bae25fc6fd83f814cd9758d507019eacd1f7..01157f916da0f6a0a2b79a6ff70ebedd7bfe9ef9 100644 (file)
@@ -1651,7 +1651,7 @@ TEST(EventBaseTest, EventBaseThreadLoop) {
   });
   base.loop();
 
-  ASSERT_EQ(true, ran);
+  ASSERT_TRUE(ran);
 }
 
 TEST(EventBaseTest, EventBaseThreadName) {
index 89e12052d75d3e9b8e335b96a4493fcb732f29c0..36e3ab554b1aee6025ddbbccbbd29a8fcaa305ac 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 47165031465f338495fde5348080b5fb3fcda381..152eba72b8db73720d6caf34e43f09d16d241ddc 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 ff60856769cd190703628267066d3f9584e1757f..fe34904d75d9eca150a4b4dd66d8aa5a7692e0fc 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) {