Commit d84c0515 authored by Philipp A. Hartmann's avatar Philipp A. Hartmann

jsoncheckertest: add checks for iterative parser as well

parent 83410955
......@@ -65,8 +65,11 @@ TEST(JsonChecker, Reader) {
}
GenericDocument<UTF8<>, CrtAllocator> document; // Use Crt allocator to check exception-safety (no memory leak)
if (!document.Parse((const char*)json).HasParseError())
ADD_FAILURE_AT(filename, document.GetErrorOffset());
document.Parse((const char*)json);
EXPECT_TRUE(document.HasParseError());
document.Parse<kParseIterativeFlag>((const char*)json);
EXPECT_TRUE(document.HasParseError());
free(json);
}
......@@ -87,7 +90,11 @@ TEST(JsonChecker, Reader) {
GenericDocument<UTF8<>, CrtAllocator> document; // Use Crt allocator to check exception-safety (no memory leak)
document.Parse((const char*)json);
EXPECT_TRUE(!document.HasParseError());
EXPECT_FALSE(document.HasParseError());
document.Parse<kParseIterativeFlag>((const char*)json);
EXPECT_FALSE(document.HasParseError());
free(json);
}
}
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