Co-Simulation/Sumo/sumo-1.7.0/unittest/src/utils/common/StringTokenizerTest.cpp
/* Tests the behaviour with a StringTokenizer::WHITECHAR for splitting a string.*/
Tests the behaviour with a StringTokenizer::WHITECHAR for splitting a string.
Tests the behaviour with a StringTokenizer :: WHITECHAR for splitting a string .
TEST(StringTokenizer, test_split_with_whitechar) {
    StringTokenizer strTok("Hello  World", StringTokenizer::WHITECHARS);
    EXPECT_TRUE(strTok.hasNext()) << "There must be more tokens available.";
    EXPECT_EQ("Hello", strTok.next());
    EXPECT_EQ("World", strTok.next());
    EXPECT_FALSE(strTok.hasNext()) << "No tokens should be available.";
}
TEST ( StringTokenizer , test_split_with_whitechar ) { StringTokenizer strTok ( " " , StringTokenizer :: WHITECHARS ) ; EXPECT_TRUE ( strTok . hasNext ( ) ) << " " ; EXPECT_EQ ( " " , strTok . next ( ) ) ; EXPECT_EQ ( " " , strTok . next ( ) ) ; EXPECT_FALSE ( strTok . hasNext ( ) ) << " " ; }
Tests the behaviour with a StringTokenizer::WHITECHAR for splitting a string.
Tests the behaviour with a StringTokenizer :: WHITECHAR for splitting a string .