From c8a1d51753c603c7bbea7dba791a8124a909c813 Mon Sep 17 00:00:00 2001 From: Milo Yip Date: Tue, 19 Apr 2016 15:05:15 +0800 Subject: [PATCH] Add reproduction test case --- test/unittest/schematest.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/unittest/schematest.cpp b/test/unittest/schematest.cpp index ff8b5d6..d1027ad 100644 --- a/test/unittest/schematest.cpp +++ b/test/unittest/schematest.cpp @@ -1299,6 +1299,15 @@ TEST(Schema, Issue552) { #endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS +TEST(SchemaValidator, Issue608) { + Document sd; + sd.Parse("{\"required\": [\"a\", \"b\"] }"); + SchemaDocument s(sd); + + VALIDATE(s, "{\"a\" : null, \"b\": null}", true); + INVALIDATE(s, "{\"a\" : null, \"a\" : null}", "", "required", ""); +} + #ifdef __clang__ RAPIDJSON_DIAG_POP #endif