summaryrefslogtreecommitdiff
path: root/json
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2014-10-05 13:41:12 -0400
committerJulian Berman <Julian@GrayVines.com>2014-10-05 13:41:12 -0400
commitd82fa02dcf0735d006c6cecab6432be4a75de881 (patch)
tree253240ccf38ee1025005ea5fd4994c07d5388a83 /json
parent8df0518ca3749ec93a3324f607fd6c07e2615f0d (diff)
parent43075285ed7271d9caaa02caa1747ead3cbb27ef (diff)
downloadjsonschema-d82fa02dcf0735d006c6cecab6432be4a75de881.tar.gz
Merge commit '43075285ed7271d9caaa02caa1747ead3cbb27ef'
* commit '43075285ed7271d9caaa02caa1747ead3cbb27ef': Squashed 'json/' changes from abdd47f..3cef243
Diffstat (limited to 'json')
-rw-r--r--json/README.md1
-rw-r--r--json/tests/draft3/optional/bignum.json47
-rw-r--r--json/tests/draft4/maxLength.json2
-rw-r--r--json/tests/draft4/optional/bignum.json47
4 files changed, 96 insertions, 1 deletions
diff --git a/json/README.md b/json/README.md
index 12c49c0..d0b4640 100644
--- a/json/README.md
+++ b/json/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/json/tests/draft3/optional/bignum.json b/json/tests/draft3/optional/bignum.json
index cd47994..ccc7c17 100644
--- a/json/tests/draft3/optional/bignum.json
+++ b/json/tests/draft3/optional/bignum.json
@@ -22,6 +22,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"},
"tests": [
@@ -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/json/tests/draft4/maxLength.json b/json/tests/draft4/maxLength.json
index 4de42bc..811d35b 100644
--- a/json/tests/draft4/maxLength.json
+++ b/json/tests/draft4/maxLength.json
@@ -20,7 +20,7 @@
},
{
"description": "ignores non-strings",
- "data": 10,
+ "data": 100,
"valid": true
},
{
diff --git a/json/tests/draft4/optional/bignum.json b/json/tests/draft4/optional/bignum.json
index cd47994..ccc7c17 100644
--- a/json/tests/draft4/optional/bignum.json
+++ b/json/tests/draft4/optional/bignum.json
@@ -22,6 +22,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"},
"tests": [
@@ -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
+ }
+ ]
}
]