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
diff options
context:
space:
mode:
Diffstat (limited to 'test/unittest/documenttest.cpp')
-rw-r--r--test/unittest/documenttest.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/unittest/documenttest.cpp b/test/unittest/documenttest.cpp
index 2b0f269f..038ddb85 100644
--- a/test/unittest/documenttest.cpp
+++ b/test/unittest/documenttest.cpp
@@ -631,6 +631,11 @@ TEST(Document, Issue1604_ASCIIValidation) {
EXPECT_EQ(kParseErrorStringInvalidEncoding, d.GetParseError());
}
+TEST(DocumentDeathTest, Issue1604_ASCIIValidation) {
+ GenericDocument<ASCII<>> d_no_check;
+ ASSERT_THROW((d_no_check.Parse("\"\\u1234\"")), AssertException);
+}
+
// This test does not properly use parsing, just for testing.
// It must call ClearStack() explicitly to prevent memory leak.
// But here we cannot as ClearStack() is private.