diff --git a/README.md b/README.md index 12c49c006..d0b464039 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ Who Uses the Test Suite This suite is being used by: + * [jsck (a fast JSON validator in CoffeeScript)](https://github.com/pandastrike/jsck) * [json-schema-validator (Java)](https://github.com/fge/json-schema-validator) * [jsonschema (python)](https://github.com/Julian/jsonschema) * [aeson-schema (haskell)](https://github.com/timjb/aeson-schema) diff --git a/tests/draft3/optional/bignum.json b/tests/draft3/optional/bignum.json index cd479949c..ccc7c17fe 100644 --- a/tests/draft3/optional/bignum.json +++ b/tests/draft3/optional/bignum.json @@ -21,6 +21,28 @@ } ] }, + { + "description": "integer", + "schema": {"type": "integer"}, + "tests": [ + { + "description": "a negative bignum is an integer", + "data": -12345678910111213141516171819202122232425262728293031, + "valid": true + } + ] + }, + { + "description": "number", + "schema": {"type": "number"}, + "tests": [ + { + "description": "a negative bignum is a number", + "data": -98249283749234923498293171823948729348710298301928331, + "valid": true + } + ] + }, { "description": "string", "schema": {"type": "string"}, @@ -56,5 +78,30 @@ "valid": false } ] + }, + { + "description": "integer comparison", + "schema": {"minimum": -18446744073709551615}, + "tests": [ + { + "description": "comparison works for very negative numbers", + "data": -18446744073709551600, + "valid": true + } + ] + }, + { + "description": "float comparison with high precision on negative numbers", + "schema": { + "minimum": -972783798187987123879878123.18878137, + "exclusiveMinimum": true + }, + "tests": [ + { + "description": "comparison works for very negative numbers", + "data": -972783798187987123879878123.188781371, + "valid": false + } + ] } ] diff --git a/tests/draft4/maxLength.json b/tests/draft4/maxLength.json index 4de42bcab..811d35b25 100644 --- a/tests/draft4/maxLength.json +++ b/tests/draft4/maxLength.json @@ -20,7 +20,7 @@ }, { "description": "ignores non-strings", - "data": 10, + "data": 100, "valid": true }, { diff --git a/tests/draft4/optional/bignum.json b/tests/draft4/optional/bignum.json index cd479949c..ccc7c17fe 100644 --- a/tests/draft4/optional/bignum.json +++ b/tests/draft4/optional/bignum.json @@ -21,6 +21,28 @@ } ] }, + { + "description": "integer", + "schema": {"type": "integer"}, + "tests": [ + { + "description": "a negative bignum is an integer", + "data": -12345678910111213141516171819202122232425262728293031, + "valid": true + } + ] + }, + { + "description": "number", + "schema": {"type": "number"}, + "tests": [ + { + "description": "a negative bignum is a number", + "data": -98249283749234923498293171823948729348710298301928331, + "valid": true + } + ] + }, { "description": "string", "schema": {"type": "string"}, @@ -56,5 +78,30 @@ "valid": false } ] + }, + { + "description": "integer comparison", + "schema": {"minimum": -18446744073709551615}, + "tests": [ + { + "description": "comparison works for very negative numbers", + "data": -18446744073709551600, + "valid": true + } + ] + }, + { + "description": "float comparison with high precision on negative numbers", + "schema": { + "minimum": -972783798187987123879878123.18878137, + "exclusiveMinimum": true + }, + "tests": [ + { + "description": "comparison works for very negative numbers", + "data": -972783798187987123879878123.188781371, + "valid": false + } + ] } ]