From 3d106085c102739a23cfd73a6e2797bebacfd791 Mon Sep 17 00:00:00 2001 From: Milo Yip Date: Sun, 27 Jul 2014 17:29:03 +0800 Subject: [PATCH] Add a space in multiple root test for ensuring that whitespace is not consumed when done. --- test/unittest/readertest.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/unittest/readertest.cpp b/test/unittest/readertest.cpp index 78079e5..61bc38c 100644 --- a/test/unittest/readertest.cpp +++ b/test/unittest/readertest.cpp @@ -559,14 +559,15 @@ struct ParseMultipleRootHandler : BaseReaderHandler<> { template void TestMultipleRoot() { - StringStream s("{}[]a"); + StringStream s("{}[] a"); ParseMultipleRootHandler h; Reader reader; EXPECT_TRUE(reader.Parse(s, h)); EXPECT_EQ(2u, h.step_); EXPECT_TRUE(reader.Parse(s, h)); EXPECT_EQ(4u, h.step_); - EXPECT_EQ('a', s.Peek()); + EXPECT_EQ(' ', s.Take()); + EXPECT_EQ('a', s.Take()); } TEST(Reader, Parse_MultipleRoot) {