Skip to content

Commit

Permalink
Squashed 'json/' changes from abdd47f..3cef243
Browse files Browse the repository at this point in the history
3cef243 Applies to Draft4 as well.
f323723 Check comparisons for very negative numbers as well.
c73cf22 Merge pull request #60 from gilesbowkett/added-jsck-to-who-uses-it
e77c86a jsck uses JSON Schema Test Suite
1a96775 Merge pull request #57 from tanaka-tatsuya/fix/max-length-test-case
b124928 fixed maxLength test case

git-subtree-dir: json
git-subtree-split: 3cef243acce1290c8bbbc546f7f3fcbd6c10ff8b
  • Loading branch information
Julian committed Oct 5, 2014
1 parent ed332a1 commit 4307528
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -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)
Expand Down
47 changes: 47 additions & 0 deletions tests/draft3/optional/bignum.json
Expand Up @@ -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"},
Expand Down Expand Up @@ -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
}
]
}
]
2 changes: 1 addition & 1 deletion tests/draft4/maxLength.json
Expand Up @@ -20,7 +20,7 @@
},
{
"description": "ignores non-strings",
"data": 10,
"data": 100,
"valid": true
},
{
Expand Down
47 changes: 47 additions & 0 deletions tests/draft4/optional/bignum.json
Expand Up @@ -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"},
Expand Down Expand Up @@ -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
}
]
}
]

0 comments on commit 4307528

Please sign in to comment.