mirror of
https://github.com/Tencent/rapidjson.git
synced 2025-10-28 19:52:02 +01:00
Added a unit test for SkipWhitespace()
This commit is contained in:
@@ -576,3 +576,12 @@ TEST(Reader, Parse_Error) {
|
||||
|
||||
#undef TEST_ERROR
|
||||
}
|
||||
|
||||
TEST(Reader, SkipWhitespace) {
|
||||
StringStream ss(" A \t\tB\n \n\nC\r\r \rD \t\n\r E");
|
||||
const char* expected = "ABCDE";
|
||||
for (size_t i = 0; i < 5; i++) {
|
||||
SkipWhitespace(ss);
|
||||
EXPECT_EQ(expected[i], ss.Take());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user