Skip to content

Commit 4307528

Browse files
committed
Squashed 'json/' changes from abdd47f..3cef243
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
1 parent ed332a1 commit 4307528

File tree

4 files changed

+96
-1
lines changed

4 files changed

+96
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Who Uses the Test Suite
6060

6161
This suite is being used by:
6262

63+
* [jsck (a fast JSON validator in CoffeeScript)](https://github.com/pandastrike/jsck)
6364
* [json-schema-validator (Java)](https://github.com/fge/json-schema-validator)
6465
* [jsonschema (python)](https://github.com/Julian/jsonschema)
6566
* [aeson-schema (haskell)](https://github.com/timjb/aeson-schema)

tests/draft3/optional/bignum.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,28 @@
2121
}
2222
]
2323
},
24+
{
25+
"description": "integer",
26+
"schema": {"type": "integer"},
27+
"tests": [
28+
{
29+
"description": "a negative bignum is an integer",
30+
"data": -12345678910111213141516171819202122232425262728293031,
31+
"valid": true
32+
}
33+
]
34+
},
35+
{
36+
"description": "number",
37+
"schema": {"type": "number"},
38+
"tests": [
39+
{
40+
"description": "a negative bignum is a number",
41+
"data": -98249283749234923498293171823948729348710298301928331,
42+
"valid": true
43+
}
44+
]
45+
},
2446
{
2547
"description": "string",
2648
"schema": {"type": "string"},
@@ -56,5 +78,30 @@
5678
"valid": false
5779
}
5880
]
81+
},
82+
{
83+
"description": "integer comparison",
84+
"schema": {"minimum": -18446744073709551615},
85+
"tests": [
86+
{
87+
"description": "comparison works for very negative numbers",
88+
"data": -18446744073709551600,
89+
"valid": true
90+
}
91+
]
92+
},
93+
{
94+
"description": "float comparison with high precision on negative numbers",
95+
"schema": {
96+
"minimum": -972783798187987123879878123.18878137,
97+
"exclusiveMinimum": true
98+
},
99+
"tests": [
100+
{
101+
"description": "comparison works for very negative numbers",
102+
"data": -972783798187987123879878123.188781371,
103+
"valid": false
104+
}
105+
]
59106
}
60107
]

tests/draft4/maxLength.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
{
2222
"description": "ignores non-strings",
23-
"data": 10,
23+
"data": 100,
2424
"valid": true
2525
},
2626
{

tests/draft4/optional/bignum.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,28 @@
2121
}
2222
]
2323
},
24+
{
25+
"description": "integer",
26+
"schema": {"type": "integer"},
27+
"tests": [
28+
{
29+
"description": "a negative bignum is an integer",
30+
"data": -12345678910111213141516171819202122232425262728293031,
31+
"valid": true
32+
}
33+
]
34+
},
35+
{
36+
"description": "number",
37+
"schema": {"type": "number"},
38+
"tests": [
39+
{
40+
"description": "a negative bignum is a number",
41+
"data": -98249283749234923498293171823948729348710298301928331,
42+
"valid": true
43+
}
44+
]
45+
},
2446
{
2547
"description": "string",
2648
"schema": {"type": "string"},
@@ -56,5 +78,30 @@
5678
"valid": false
5779
}
5880
]
81+
},
82+
{
83+
"description": "integer comparison",
84+
"schema": {"minimum": -18446744073709551615},
85+
"tests": [
86+
{
87+
"description": "comparison works for very negative numbers",
88+
"data": -18446744073709551600,
89+
"valid": true
90+
}
91+
]
92+
},
93+
{
94+
"description": "float comparison with high precision on negative numbers",
95+
"schema": {
96+
"minimum": -972783798187987123879878123.18878137,
97+
"exclusiveMinimum": true
98+
},
99+
"tests": [
100+
{
101+
"description": "comparison works for very negative numbers",
102+
"data": -972783798187987123879878123.188781371,
103+
"valid": false
104+
}
105+
]
59106
}
60107
]

0 commit comments

Comments
 (0)