Commit e8ca7f09 authored by Adam Simpkins's avatar Adam Simpkins Committed by Facebook Github Bot

logging: clean up some test checks for gcc-4.9 platforms

Summary:
Change some `EXPECT_EQ()` statements to `EXPECT_TRUE()` and `EXPECT_FALSE()`.
This was causing compilation failures on some gcc-4.9 platforms.

Reviewed By: yfeldblum

Differential Revision: D6869102

fbshipit-source-id: c3294eeca90130fec601c60a76cfa4dc1bc81639
parent aca1d9ef
...@@ -138,10 +138,10 @@ TEST(ConfigUpdate, updateConfig) { ...@@ -138,10 +138,10 @@ TEST(ConfigUpdate, updateConfig) {
// Update the log level for category "foo" // Update the log level for category "foo"
// This should not affect the existing settings for the root category // This should not affect the existing settings for the root category
EXPECT_EQ(LogLevel::MAX_LEVEL, db.getCategory("foo")->getLevel()); EXPECT_EQ(LogLevel::MAX_LEVEL, db.getCategory("foo")->getLevel());
EXPECT_EQ(true, db.getCategory("foo")->getLevelInfo().second); EXPECT_TRUE(db.getCategory("foo")->getLevelInfo().second);
db.updateConfig(parseLogConfig("foo:=DBG2")); db.updateConfig(parseLogConfig("foo:=DBG2"));
EXPECT_EQ(LogLevel::DBG2, db.getCategory("foo")->getLevel()); EXPECT_EQ(LogLevel::DBG2, db.getCategory("foo")->getLevel());
EXPECT_EQ(false, db.getCategory("foo")->getLevelInfo().second); EXPECT_FALSE(db.getCategory("foo")->getLevelInfo().second);
EXPECT_EQ(LogLevel::INFO, db.getCategory("")->getLevel()); EXPECT_EQ(LogLevel::INFO, db.getCategory("")->getLevel());
EXPECT_EQ(1, db.getCategory("")->getHandlers().size()); EXPECT_EQ(1, db.getCategory("")->getHandlers().size());
EXPECT_EQ( EXPECT_EQ(
......
...@@ -28,7 +28,7 @@ using namespace folly; ...@@ -28,7 +28,7 @@ using namespace folly;
LogMessage checkMsg{ \ LogMessage checkMsg{ \
category, LogLevel::ERR, __FILE__, __LINE__, std::string{value}}; \ category, LogLevel::ERR, __FILE__, __LINE__, std::string{value}}; \
EXPECT_EQ(expected, checkMsg.getMessage()); \ EXPECT_EQ(expected, checkMsg.getMessage()); \
EXPECT_EQ(hasNewlines, checkMsg.containsNewlines()); \ EXPECT_EQ(static_cast<int>(hasNewlines), checkMsg.containsNewlines()); \
EXPECT_EQ(__FILE__, checkMsg.getFileName()); \ EXPECT_EQ(__FILE__, checkMsg.getFileName()); \
EXPECT_EQ(__LINE__, checkMsg.getLineNumber()); \ EXPECT_EQ(__LINE__, checkMsg.getLineNumber()); \
} }
......
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