diff options
author | Alexei Rousskikh <ext-alexei.rousskikh@nokia.com> | 2012-03-01 11:23:05 -0500 |
---|---|---|
committer | Chris Craig <ext-chris.craig@nokia.com> | 2012-03-01 18:11:41 +0100 |
commit | d55adf7a57be778fdf60363f682b77c2bc51f434 (patch) | |
tree | 0f1a2771ca62f26c4a55b8c6ecb60b5596edad9a /tests | |
parent | 49f3d62b76baf32bf324758e5af6ec0b85900eb0 (diff) |
fixed missed property check when additionalProperties=false
Change-Id: I71f53054c5a4a6da2058caa8c93ac813d0977078
Reviewed-by: Chris Craig <ext-chris.craig@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/jsonschema/tst_jsonschema.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/jsonschema/tst_jsonschema.cpp b/tests/auto/jsonschema/tst_jsonschema.cpp index 2a66b26..383284b 100644 --- a/tests/auto/jsonschema/tst_jsonschema.cpp +++ b/tests/auto/jsonschema/tst_jsonschema.cpp @@ -203,6 +203,8 @@ void tst_JsonSchema::testAdditionalPropertiesValidation() "{ \"properties\" : { \"a\" : {}, \"b\" : {} }, \"additionalProperties\" : true }")); QVERIFY(validate("{ \"a\" : 1, \"b\" : 2, \"c\" : 3 }", "{ \"properties\" : { \"a\" : {}, \"b\" : {}, \"c\" : {} }, \"additionalProperties\" : false }")); + QVERIFY(validate("{ \"a\" : 1, \"b\" : 2 }", // a property 'c' is missing - still valid + "{ \"properties\" : { \"a\" : {}, \"b\" : {}, \"c\" : {} }, \"additionalProperties\" : false }")); QVERIFY(validate("{ \"a\" : 1, \"b\" : 2, \"c\" : 3 }", "{ \"additionalProperties\" : { \"type\" : \"number\" } }")); QVERIFY(validate("{ \"a\" : 1, \"b\" : 2, \"c\" : 3 }", |