mirror of
https://github.com/Tencent/rapidjson.git
synced 2025-10-28 19:52:02 +01:00
Add a space in multiple root test for ensuring that whitespace is not consumed when done.
This commit is contained in:
@@ -559,14 +559,15 @@ struct ParseMultipleRootHandler : BaseReaderHandler<> {
|
||||
|
||||
template <unsigned parseFlags>
|
||||
void TestMultipleRoot() {
|
||||
StringStream s("{}[]a");
|
||||
StringStream s("{}[] a");
|
||||
ParseMultipleRootHandler h;
|
||||
Reader reader;
|
||||
EXPECT_TRUE(reader.Parse<parseFlags>(s, h));
|
||||
EXPECT_EQ(2u, h.step_);
|
||||
EXPECT_TRUE(reader.Parse<parseFlags>(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) {
|
||||
|
||||
Reference in New Issue
Block a user