Co-Simulation/Sumo/sumo-1.7.0/unittest/src/utils/common/StringTokenizerTest.cpp
/* Tests the behaviour with any tokens for splitting a string with the option splitAtAllChars=true*/
Tests the behaviour with any tokens for splitting a string with the option splitAtAllChars=true
Tests the behaviour with any tokens for splitting a string with the option splitAtAllChars = true
TEST(StringTokenizer, test_split_any_char) {
    StringTokenizer strTok("HelloxWyorld", "xy", true);
    EXPECT_TRUE(strTok.hasNext()) << "There must be more tokens available.";
    EXPECT_EQ("Hello", strTok.next());
    EXPECT_EQ("W", strTok.next());
    EXPECT_EQ("orld", strTok.next());
    EXPECT_FALSE(strTok.hasNext()) << "No tokens should be available.";
}
TEST ( StringTokenizer , test_split_any_char ) { StringTokenizer strTok ( " " , " " , true ) ; EXPECT_TRUE ( strTok . hasNext ( ) ) << " " ; EXPECT_EQ ( " " , strTok . next ( ) ) ; EXPECT_EQ ( " " , strTok . next ( ) ) ; EXPECT_EQ ( " " , strTok . next ( ) ) ; EXPECT_FALSE ( strTok . hasNext ( ) ) << " " ; }
Tests the behaviour with any tokens for splitting a string with the option splitAtAllChars=true
Tests the behaviour with any tokens for splitting a string with the option splitAtAllChars = true