Skip to content

Commit

Permalink
work around issue 1089
Browse files Browse the repository at this point in the history
  • Loading branch information
smhdfdl committed Feb 3, 2021
1 parent 28dc42d commit 167efb4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bin/unittestschema/address.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
"type": "integer"
},
"decimal_type": {
"multipleOf": 0.1,
"multipleOf": 1.0,
"type": "number"
},
"time_type": {
Expand Down
8 changes: 4 additions & 4 deletions test/unittest/schematest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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\": \"#\""
Expand All @@ -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\": \"#\""
Expand All @@ -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\": \"#\""
Expand Down

0 comments on commit 167efb4

Please sign in to comment.