From 18f713a62244d4ad4606a3de9bc74a85ce5b8a5c Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 23 Mar 2017 10:18:49 -0700 Subject: [PATCH] change EXPECT_EQ(false, ... to EXPECT_FALSE(...; ditto for ASSERT_EQ 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 | 2 +- folly/io/test/IOBufCursorTest.cpp | 2 +- folly/test/DynamicConverterTest.cpp | 4 ++-- folly/test/DynamicTest.cpp | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/folly/io/async/test/EventBaseTest.cpp b/folly/io/async/test/EventBaseTest.cpp index 6724bae2..01157f91 100644 --- a/folly/io/async/test/EventBaseTest.cpp +++ b/folly/io/async/test/EventBaseTest.cpp @@ -1651,7 +1651,7 @@ TEST(EventBaseTest, EventBaseThreadLoop) { }); base.loop(); - ASSERT_EQ(true, ran); + ASSERT_TRUE(ran); } TEST(EventBaseTest, EventBaseThreadName) { diff --git a/folly/io/test/IOBufCursorTest.cpp b/folly/io/test/IOBufCursorTest.cpp index 89e12052..36e3ab55 100644 --- a/folly/io/test/IOBufCursorTest.cpp +++ b/folly/io/test/IOBufCursorTest.cpp @@ -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 (...) { } } diff --git a/folly/test/DynamicConverterTest.cpp b/folly/test/DynamicConverterTest.cpp index 47165031..152eba72 100644 --- a/folly/test/DynamicConverterTest.cpp +++ b/folly/test/DynamicConverterTest.cpp @@ -296,11 +296,11 @@ TEST(DynamicConverter, consts) { dynamic d3 = true; auto i3 = convertTo(d3); - EXPECT_EQ(true, i3); + EXPECT_TRUE(i3); dynamic d4 = "true"; auto i4 = convertTo(d4); - EXPECT_EQ(true, i4); + EXPECT_TRUE(i4); dynamic d5 = dynamic::array(1, 2); auto i5 = convertTo>(d5); diff --git a/folly/test/DynamicTest.cpp b/folly/test/DynamicTest.cpp index ff608567..fe34904d 100644 --- a/folly/test/DynamicTest.cpp +++ b/folly/test/DynamicTest.cpp @@ -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) { -- 2.34.1