Commit 0dd60e57 authored by Victor Zverovich's avatar Victor Zverovich Committed by Facebook GitHub Bot

Fix LoggerTest

Summary: Fix overspecified LoggerTest.

Reviewed By: yfeldblum, simpkins

Differential Revision: D23425421

fbshipit-source-id: ecfd7d0e73555b3a94a81b54ffd1287bf9664697
parent bc8a9f69
......@@ -206,11 +206,10 @@ TEST_F(LoggerTest, formatFallbackError) {
ASSERT_EQ(1, messages.size());
EXPECT_THAT(
messages[0].first.getMessage(),
MatchesRegex(
R"(error formatting log message: .*argument index out of range; )"
R"(format string: "param1: \{\}, param2: \{\}, \{\}", )"
R"(arguments: 1234, )"
R"(\[(.*ToStringFailure.*|object) of size (.*):.*\])"));
MatchesRegex(R"(error formatting log message: .*format_error.*; )"
R"(format string: "param1: \{\}, param2: \{\}, \{\}", )"
R"(arguments: 1234, )"
R"(\[(.*ToStringFailure.*|object) of size (.*):.*\])"));
EXPECT_EQ("LoggerTest.cpp", pathBasename(messages[0].first.getFileName()));
EXPECT_EQ(LogLevel::WARN, messages[0].first.getLevel());
EXPECT_FALSE(messages[0].first.containsNewlines());
......@@ -345,9 +344,8 @@ TEST_F(LoggerTest, logMacros) {
ASSERT_EQ(1, messages.size());
EXPECT_THAT(
messages[0].first.getMessage(),
MatchesRegex(
R"(error formatting log message: .*argument index out of range; )"
R"(format string: "whoops: \{\}, \{\}", arguments: 5)"));
MatchesRegex(R"(error formatting log message: .*format_error.*; )"
R"(format string: "whoops: \{\}, \{\}", arguments: 5)"));
messages.clear();
}
......
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