src/base/stats/info.test.cc
/** Test that the first character accepts alpha and underscore. */
Test that the first character accepts alpha and underscore.
Test that the first character accepts alpha and underscore .
TEST(StatsInfoTest, NameFirstCharacter)
{
    TestInfo info;
    info.setName("X", false);
    ASSERT_EQ(info.name, "X");
    TestInfo info2;
    info2.setName("a", false);
    ASSERT_EQ(info2.name, "a");
    TestInfo info3;
    info3.setName("_", false);
    ASSERT_EQ(info3.name, "_");
    TestInfo info4;
    info4.setName("X.Y", false);
    ASSERT_EQ(info4.name, "X.Y");
    TestInfo info5;
    info5.setName("a.b._.d.e", false);
    ASSERT_EQ(info5.name, "a.b._.d.e");
}
TEST ( StatsInfoTest , NameFirstCharacter ) { TestInfo info ; info . setName ( " " , false ) ; ASSERT_EQ ( info . name , " " ) ; TestInfo info2 ; info2 . setName ( " " , false ) ; ASSERT_EQ ( info2 . name , " " ) ; TestInfo info3 ; info3 . setName ( " " , false ) ; ASSERT_EQ ( info3 . name , " " ) ; TestInfo info4 ; info4 . setName ( " " , false ) ; ASSERT_EQ ( info4 . name , " " ) ; TestInfo info5 ; info5 . setName ( " " , false ) ; ASSERT_EQ ( info5 . name , " " ) ; }
Test that the first character accepts alpha and underscore.
Test that the first character accepts alpha and underscore .