StringTokenizer trailing empty tokens consistency

Modified StringTokenizer to eith include or exclude all empty tokens
(including trailing ones based on TOK_IGNORE_EMPTY option.
This commit is contained in:
aleks-f
2012-11-07 00:30:01 -06:00
parent 15d27daea6
commit 67a27ac2fa
4 changed files with 266 additions and 243 deletions

View File

@@ -133,6 +133,8 @@ void StringTokenizerTest::testStringTokenizer()
assert (*it++ == "a");
assert (it != st.end());
assert (*it++ == "");
assert (it != st.end());
assert (*it++ == "");
assert (it == st.end());
}
{
@@ -144,6 +146,8 @@ void StringTokenizerTest::testStringTokenizer()
assert (*it++ == "a");
assert (it != st.end());
assert (*it++ == "");
assert (it != st.end());
assert (*it++ == "");
assert (it == st.end());
}
{
@@ -306,6 +310,8 @@ void StringTokenizerTest::testStringTokenizer()
assert (*it++ == "ab");
assert (it != st.end());
assert (*it++ == "cd");
assert (it != st.end());
assert (*it++ == "");
assert (it == st.end());
}
{