diff options
author | Julian Berman <Julian@GrayVines.com> | 2020-10-04 11:58:30 -0400 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2020-10-04 11:58:30 -0400 |
commit | 78d869421b2bf096251bc89ee908ed0cbff62952 (patch) | |
tree | 3dd210b6a1cb015ee6221a9597f4b2c3d0ede734 /json/tests/draft6 | |
parent | ddcc2e23dfd1cd5c5e60403bca32b36bf2c2f50c (diff) | |
parent | 918803aa556f4f87d6b952af316d47ecaf089164 (diff) | |
download | jsonschema-78d869421b2bf096251bc89ee908ed0cbff62952.tar.gz |
Merge commit '918803aa556f4f87d6b952af316d47ecaf089164' into master
* commit '918803aa556f4f87d6b952af316d47ecaf089164':
Squashed 'json/' changes from 21555a85..96742ba3
Diffstat (limited to 'json/tests/draft6')
-rw-r--r-- | json/tests/draft6/multipleOf.json | 11 | ||||
-rw-r--r-- | json/tests/draft6/optional/float-overflow.json | 13 |
2 files changed, 24 insertions, 0 deletions
diff --git a/json/tests/draft6/multipleOf.json b/json/tests/draft6/multipleOf.json index ca3b761..faa87cf 100644 --- a/json/tests/draft6/multipleOf.json +++ b/json/tests/draft6/multipleOf.json @@ -56,5 +56,16 @@ "valid": false } ] + }, + { + "description": "invalid instance should not raise error when float division = inf", + "schema": {"type": "integer", "multipleOf": 0.123456789}, + "tests": [ + { + "description": "always invalid, but naive implementations may raise an overflow error", + "data": 1e308, + "valid": false + } + ] } ] diff --git a/json/tests/draft6/optional/float-overflow.json b/json/tests/draft6/optional/float-overflow.json new file mode 100644 index 0000000..52ff982 --- /dev/null +++ b/json/tests/draft6/optional/float-overflow.json @@ -0,0 +1,13 @@ +[ + { + "description": "all integers are multiples of 0.5, if overflow is handled", + "schema": {"type": "integer", "multipleOf": 0.5}, + "tests": [ + { + "description": "valid if optional overflow handling is implemented", + "data": 1e308, + "valid": true + } + ] + } +] |