Skip to content

Commit 8dbaf21

Browse files
committed
Fix line endings and add invalid test case.
1 parent 7829853 commit 8dbaf21

File tree

1 file changed

+66
-61
lines changed

1 file changed

+66
-61
lines changed

tests/draft3/additionalItems.json

+66-61
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,66 @@
1-
[
2-
{
3-
"description": "additionalItems as schema",
4-
"schema": {
5-
"additionalItems": {"type": "integer"}
6-
},
7-
"tests": [
8-
{
9-
"description": "all items match schema",
10-
"data": [ 1, 2, 3, 4.5, 5 ],
11-
"valid": true
12-
}
13-
]
14-
},
15-
{
16-
"description": "items is schema, no additionalItems",
17-
"schema": {
18-
"items": {},
19-
"additionalItems": false
20-
},
21-
"tests": [
22-
{
23-
"description": "all items match schema",
24-
"data": [ 1, 2, 3, 4, 5 ],
25-
"valid": true
26-
}
27-
]
28-
},
29-
{
30-
"description": "array of items with no additionalItems",
31-
"schema": {
32-
"items": [{}, {}, {}],
33-
"additionalItems": false
34-
},
35-
"tests": [
36-
{
37-
"description": "no additional items present",
38-
"data": [ 1, 2, 3 ],
39-
"valid": true
40-
},
41-
{
42-
"description": "additional items are not permitted",
43-
"data": [ 1, 2, 3, 4 ],
44-
"valid": false
45-
}
46-
]
47-
},
48-
{
49-
"description": "additionalItems as false without items",
50-
"schema": {
51-
"additionalItems": false
52-
},
53-
"tests": [
54-
{
55-
"description": "items should allow anything",
56-
"data": [ 1, 2, 3, 4, 5 ],
57-
"valid": true
58-
}
59-
]
60-
}
61-
]
1+
[
2+
{
3+
"description": "additionalItems as schema",
4+
"schema": {
5+
"additionalItems": {"type": "integer"}
6+
},
7+
"tests": [
8+
{
9+
"description": "all items match schema",
10+
"data": [ 1, 2, 3, 4.5, 5 ],
11+
"valid": true
12+
},
13+
{
14+
"description": "all items match schema",
15+
"data": [ 1, 2, 3, "foo" ],
16+
"valid": false
17+
}
18+
]
19+
},
20+
{
21+
"description": "items is schema, no additionalItems",
22+
"schema": {
23+
"items": {},
24+
"additionalItems": false
25+
},
26+
"tests": [
27+
{
28+
"description": "all items match schema",
29+
"data": [ 1, 2, 3, 4, 5 ],
30+
"valid": true
31+
}
32+
]
33+
},
34+
{
35+
"description": "array of items with no additionalItems",
36+
"schema": {
37+
"items": [{}, {}, {}],
38+
"additionalItems": false
39+
},
40+
"tests": [
41+
{
42+
"description": "no additional items present",
43+
"data": [ 1, 2, 3 ],
44+
"valid": true
45+
},
46+
{
47+
"description": "additional items are not permitted",
48+
"data": [ 1, 2, 3, 4 ],
49+
"valid": false
50+
}
51+
]
52+
},
53+
{
54+
"description": "additionalItems as false without items",
55+
"schema": {
56+
"additionalItems": false
57+
},
58+
"tests": [
59+
{
60+
"description": "items should allow anything",
61+
"data": [ 1, 2, 3, 4, 5 ],
62+
"valid": true
63+
}
64+
]
65+
}
66+
]

0 commit comments

Comments
 (0)