diff options
author | Steve Hanson <smh@uk.ibm.com> | 2021-02-03 11:34:10 +0300 |
---|---|---|
committer | Steve Hanson <smh@uk.ibm.com> | 2021-02-03 11:34:10 +0300 |
commit | 167efb4fa065d3eb1b31699debc89498d04188d8 (patch) | |
tree | d8866d45ef2f3ab3f056d888a10ee9215551af38 | |
parent | 28dc42d8d37ea0aa5f878f182cfa36265b4e3e46 (diff) |
work around issue 1089
-rw-r--r-- | bin/unittestschema/address.json | 2 | ||||
-rw-r--r-- | test/unittest/schematest.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/bin/unittestschema/address.json b/bin/unittestschema/address.json index 007d971d..c3cf6426 100644 --- a/bin/unittestschema/address.json +++ b/bin/unittestschema/address.json @@ -115,7 +115,7 @@ "type": "integer" }, "decimal_type": { - "multipleOf": 0.1, + "multipleOf": 1.0, "type": "number" }, "time_type": { diff --git a/test/unittest/schematest.cpp b/test/unittest/schematest.cpp index 7f1b43ec..ad19cd9d 100644 --- a/test/unittest/schematest.cpp +++ b/test/unittest/schematest.cpp @@ -2293,7 +2293,7 @@ TEST(SchemaValidator, ContinueOnErrors) { VALIDATE(s, "{\"version\": 1.0, \"address\": {\"number\": 24, \"street1\": \"The Woodlands\", \"street3\": \"Ham\", \"city\": \"Romsey\", \"area\": \"Kent\", \"country\": \"UK\", \"postcode\": \"SO51 0GP\"}, \"phones\": [\"0111-222333\", \"0777-666888\"], \"names\": [\"Fred\", \"Bloggs\"]}", true); INVALIDATE_(s, "{\"version\": 1.01, \"address\": {\"number\": 0, \"street2\": false, \"street3\": \"Ham\", \"city\": \"RomseyTownFC\", \"area\": \"BC\", \"country\": \"USA\", \"postcode\": \"999ABC\"}, \"phones\": [], \"planet\": \"Earth\", \"extra\": {\"S_xxx\": 123}}", "#", "errors", "#", "{ \"multipleOf\": {" - " \"errorCode\": 1, \"instanceRef\": \"#/version\", \"schemaRef\": \"#/definitions/decimal_type\", \"expected\": 0.1, \"actual\": 1.01" + " \"errorCode\": 1, \"instanceRef\": \"#/version\", \"schemaRef\": \"#/definitions/decimal_type\", \"expected\": 1.0, \"actual\": 1.01" " }," " \"minimum\": {" " \"errorCode\": 5, \"instanceRef\": \"#/address/number\", \"schemaRef\": \"#/definitions/positiveInt_type\", \"expected\": 0, \"actual\": 0, \"exclusiveMinimum\": true" @@ -2390,7 +2390,7 @@ TEST(SchemaValidator, ContinueOnErrors_OneOf) { "{ \"oneOf\": {" " \"errors\": [{" " \"multipleOf\": {" - " \"errorCode\": 1, \"instanceRef\": \"#/version\", \"schemaRef\": \"http://localhost:1234/address.json#/definitions/decimal_type\", \"expected\": 0.1, \"actual\": 1.01" + " \"errorCode\": 1, \"instanceRef\": \"#/version\", \"schemaRef\": \"http://localhost:1234/address.json#/definitions/decimal_type\", \"expected\": 1.0, \"actual\": 1.01" " }" " }]," " \"errorCode\": 21, \"instanceRef\": \"#\", \"schemaRef\": \"#\"" @@ -2416,7 +2416,7 @@ TEST(SchemaValidator, ContinueOnErrors_AllOf) { "{ \"allOf\": {" " \"errors\": [{" " \"multipleOf\": {" - " \"errorCode\": 1, \"instanceRef\": \"#/version\", \"schemaRef\": \"http://localhost:1234/address.json#/definitions/decimal_type\", \"expected\": 0.1, \"actual\": 1.01" + " \"errorCode\": 1, \"instanceRef\": \"#/version\", \"schemaRef\": \"http://localhost:1234/address.json#/definitions/decimal_type\", \"expected\": 1.0, \"actual\": 1.01" " }" " }]," " \"errorCode\": 23, \"instanceRef\": \"#\", \"schemaRef\": \"#\"" @@ -2442,7 +2442,7 @@ TEST(SchemaValidator, ContinueOnErrors_AnyOf) { "{ \"anyOf\": {" " \"errors\": [{" " \"multipleOf\": {" - " \"errorCode\": 1, \"instanceRef\": \"#/version\", \"schemaRef\": \"http://localhost:1234/address.json#/definitions/decimal_type\", \"expected\": 0.1, \"actual\": 1.01" + " \"errorCode\": 1, \"instanceRef\": \"#/version\", \"schemaRef\": \"http://localhost:1234/address.json#/definitions/decimal_type\", \"expected\": 1.0, \"actual\": 1.01" " }" " }]," " \"errorCode\": 24, \"instanceRef\": \"#\", \"schemaRef\": \"#\"" |