Better logging test
This commit is contained in:
parent
abf4385120
commit
be110e7109
1 changed files with 13 additions and 0 deletions
|
@ -60,3 +60,16 @@ UNIT_TEST(Logging_ConditionalLog)
|
|||
CLOG(LWARNING, BoolFunction(false, isCalled), ("This should be displayed"));
|
||||
TEST(isCalled, ());
|
||||
}
|
||||
|
||||
UNIT_TEST(Logging_Levels)
|
||||
{
|
||||
base::LogLevel level = NUM_LOG_LEVELS;
|
||||
bool good = base::FromString("DEBUG", level);
|
||||
EXPECT_TRUE(good);
|
||||
EXPECT_EQ(level, base::LDEBUG);
|
||||
|
||||
good = base::FromString("YAVASYA", level);
|
||||
EXPECT_FALSE(good);
|
||||
|
||||
EXPECT_EQ(base::ToString(base::LDEBUG), "DEBUG");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue