src/base/stats/info.test.cc
/** Test that the non-first characters accept alpha-numeric and underscore. */
Test that the non-first characters accept alpha-numeric and underscore.
Test that the non - first characters accept alpha - numeric and underscore .
TEST(StatsInfoTest, NameOtherCharacters)
{
    TestInfo info;
    info.setName("abCde", false);
    ASSERT_EQ(info.name, "abCde");
    TestInfo info2;
    info2.setName("ab_de", false);
    ASSERT_EQ(info2.name, "ab_de");
    TestInfo info3;
    info3.setName("ab9de", false);
    ASSERT_EQ(info3.name, "ab9de");
    TestInfo info4;
    info4.setName("a_bCD12_ef", false);
    ASSERT_EQ(info4.name, "a_bCD12_ef");
    TestInfo info5;
    info5.setName("a_._bC.D12_ef", false);
    ASSERT_EQ(info5.name, "a_._bC.D12_ef");
}
TEST ( StatsInfoTest , NameOtherCharacters ) { 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 non-first characters accept alpha-numeric and underscore.
Test that the non - first characters accept alpha - numeric and underscore .