Commit 4bf350c5 authored by Milo Yip's avatar Milo Yip

Added a unit test for SkipWhitespace()

parent 84f64ba5
......@@ -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());
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment