Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/miloyip/rapidjson.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPhilipp A. Hartmann <pah@qo.cx>2014-08-11 18:11:57 +0400
committerPhilipp A. Hartmann <pah@qo.cx>2014-08-11 19:15:07 +0400
commitd84c051564b735d438e45f0a0c1657575813c9c8 (patch)
tree415feea2f63018a43712127a00ac688c7905a421 /test
parent834109557d4822a51ec47105ca5a76c73cb584e9 (diff)
jsoncheckertest: add checks for iterative parser as well
Diffstat (limited to 'test')
-rw-r--r--test/unittest/jsoncheckertest.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/test/unittest/jsoncheckertest.cpp b/test/unittest/jsoncheckertest.cpp
index 75ef3e8f..f4169dc3 100644
--- a/test/unittest/jsoncheckertest.cpp
+++ b/test/unittest/jsoncheckertest.cpp
@@ -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);
}
}