Skip to content

Commit 167efb4

Browse files
author
Steve Hanson
committed
work around issue 1089
1 parent 28dc42d commit 167efb4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

bin/unittestschema/address.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
"type": "integer"
116116
},
117117
"decimal_type": {
118-
"multipleOf": 0.1,
118+
"multipleOf": 1.0,
119119
"type": "number"
120120
},
121121
"time_type": {

test/unittest/schematest.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2293,7 +2293,7 @@ TEST(SchemaValidator, ContinueOnErrors) {
22932293
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);
22942294
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", "#",
22952295
"{ \"multipleOf\": {"
2296-
" \"errorCode\": 1, \"instanceRef\": \"#/version\", \"schemaRef\": \"#/definitions/decimal_type\", \"expected\": 0.1, \"actual\": 1.01"
2296+
" \"errorCode\": 1, \"instanceRef\": \"#/version\", \"schemaRef\": \"#/definitions/decimal_type\", \"expected\": 1.0, \"actual\": 1.01"
22972297
" },"
22982298
" \"minimum\": {"
22992299
" \"errorCode\": 5, \"instanceRef\": \"#/address/number\", \"schemaRef\": \"#/definitions/positiveInt_type\", \"expected\": 0, \"actual\": 0, \"exclusiveMinimum\": true"
@@ -2390,7 +2390,7 @@ TEST(SchemaValidator, ContinueOnErrors_OneOf) {
23902390
"{ \"oneOf\": {"
23912391
" \"errors\": [{"
23922392
" \"multipleOf\": {"
2393-
" \"errorCode\": 1, \"instanceRef\": \"#/version\", \"schemaRef\": \"http://localhost:1234/address.json#/definitions/decimal_type\", \"expected\": 0.1, \"actual\": 1.01"
2393+
" \"errorCode\": 1, \"instanceRef\": \"#/version\", \"schemaRef\": \"http://localhost:1234/address.json#/definitions/decimal_type\", \"expected\": 1.0, \"actual\": 1.01"
23942394
" }"
23952395
" }],"
23962396
" \"errorCode\": 21, \"instanceRef\": \"#\", \"schemaRef\": \"#\""
@@ -2416,7 +2416,7 @@ TEST(SchemaValidator, ContinueOnErrors_AllOf) {
24162416
"{ \"allOf\": {"
24172417
" \"errors\": [{"
24182418
" \"multipleOf\": {"
2419-
" \"errorCode\": 1, \"instanceRef\": \"#/version\", \"schemaRef\": \"http://localhost:1234/address.json#/definitions/decimal_type\", \"expected\": 0.1, \"actual\": 1.01"
2419+
" \"errorCode\": 1, \"instanceRef\": \"#/version\", \"schemaRef\": \"http://localhost:1234/address.json#/definitions/decimal_type\", \"expected\": 1.0, \"actual\": 1.01"
24202420
" }"
24212421
" }],"
24222422
" \"errorCode\": 23, \"instanceRef\": \"#\", \"schemaRef\": \"#\""
@@ -2442,7 +2442,7 @@ TEST(SchemaValidator, ContinueOnErrors_AnyOf) {
24422442
"{ \"anyOf\": {"
24432443
" \"errors\": [{"
24442444
" \"multipleOf\": {"
2445-
" \"errorCode\": 1, \"instanceRef\": \"#/version\", \"schemaRef\": \"http://localhost:1234/address.json#/definitions/decimal_type\", \"expected\": 0.1, \"actual\": 1.01"
2445+
" \"errorCode\": 1, \"instanceRef\": \"#/version\", \"schemaRef\": \"http://localhost:1234/address.json#/definitions/decimal_type\", \"expected\": 1.0, \"actual\": 1.01"
24462446
" }"
24472447
" }],"
24482448
" \"errorCode\": 24, \"instanceRef\": \"#\", \"schemaRef\": \"#\""

0 commit comments

Comments
 (0)