src/base/debug.test.cc
/** Test that names are unique. */
Test that names are unique.
Test that names are unique .
TEST(DebugFlagDeathTest, UniqueNames)
{
    debug::SimpleFlag flag("FlagUniqueNamesTest", "A");
    gtestLogOutput.str("");
    EXPECT_ANY_THROW(debug::SimpleFlag("FlagUniqueNamesTest", "B"));
    const std::string expected = "panic: panic condition !result.second "
        "occurred: Flag FlagUniqueNamesTest already defined!\n";
    std::string actual = gtestLogOutput.str();
    EXPECT_EQ(expected, actual);
}
TEST ( DebugFlagDeathTest , UniqueNames ) { debug :: SimpleFlag flag ( " " , " " ) ; gtestLogOutput . str ( " " ) ; EXPECT_ANY_THROW ( debug :: SimpleFlag ( " " , " " ) ) ; const std :: string expected = " " " \n " ; std :: string actual = gtestLogOutput . str ( ) ; EXPECT_EQ ( expected , actual ) ; }
Test that names are unique.
Test that names are unique .