Skip to content

Commit c7c2338

Browse files
committed
Remove duplicate tests.
1 parent 281c28b commit c7c2338

File tree

2 files changed

+9
-80
lines changed

2 files changed

+9
-80
lines changed

tests/draft3/additionalItems.json

+4-59
Original file line numberDiff line numberDiff line change
@@ -53,80 +53,25 @@
5353
},
5454
{
5555
"description": "additionalItems as false without items",
56-
"schema": {
57-
"additionalItems": false
58-
},
56+
"schema": {"additionalItems": false},
5957
"tests": [
6058
{
61-
"description": "items should allow anything",
59+
"description":
60+
"items defaults to empty schema so everything is valid",
6261
"data": [ 1, 2, 3, 4, 5 ],
6362
"valid": true
6463
}
6564
]
6665
},
6766
{
6867
"description": "additionalItems are allowed by default",
69-
"schema": {
70-
"items": [{"type": "integer"},
71-
{"type": "string"}]
72-
},
68+
"schema": {"items": []},
7369
"tests": [
7470
{
7571
"description": "only the first items are validated",
7672
"data": [1, "foo", false],
7773
"valid": true
7874
}
7975
]
80-
},
81-
{
82-
"description": "additional items",
83-
"schema": {
84-
"items" : [{"type": "integer"}, {"type" : "string"}],
85-
"additionalItems": false
86-
},
87-
"tests": [
88-
{
89-
"description": "no additional",
90-
"data": [1, "foo"],
91-
"valid": true
92-
},
93-
{
94-
"description": "additional",
95-
"data": [1, "foo", false],
96-
"valid": false
97-
}
98-
]
99-
},
100-
{
101-
"description": "additionalItems schema",
102-
"schema": {
103-
"items" : [{"type" : "integer"}, {"type" : "string"}],
104-
"additionalItems" : {"type" : "integer"}
105-
},
106-
"tests": [
107-
{
108-
"description": "match",
109-
"data": [1, "foo", 3],
110-
"valid": true
111-
},
112-
{
113-
"description": "no match",
114-
"data": [1, "foo", "bar"],
115-
"valid": false
116-
}
117-
]
118-
},
119-
{
120-
"description": "additionalItems ignored when items is not tuple",
121-
"schema": {
122-
"additionalItems": false
123-
},
124-
"tests": [
125-
{
126-
"description": "simple array",
127-
"data": [1, 2],
128-
"valid": true
129-
}
130-
]
13176
}
13277
]

tests/draft3/divisibleBy.json

+5-21
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[
22
{
3-
"description": "divisibleBy validation",
3+
"description": "by number",
44
"schema": {"divisibleBy": 1.5},
55
"tests": [
66
{
@@ -37,35 +37,19 @@
3737
]
3838
},
3939
{
40-
"description": "by number small",
40+
"description": "by small number",
4141
"schema": {"divisibleBy": 0.0001},
4242
"tests": [
4343
{
44-
"description": "number by number small",
44+
"description": "0.0075 is divisible by 0.0001",
4545
"data": 0.0075,
4646
"valid": true
4747
},
4848
{
49-
"description": "number by number small fail",
49+
"description": "0.00751 is not divisible by 0.0001",
5050
"data": 0.00751,
5151
"valid": false
5252
}
5353
]
54-
},
55-
{
56-
"description": "by number again",
57-
"schema": {"divisibleBy": 0.01},
58-
"tests": [
59-
{
60-
"description": "number by number again",
61-
"data": 1.09,
62-
"valid": true
63-
},
64-
{
65-
"description": "number by number again 2",
66-
"data": 1.89,
67-
"valid": true
68-
}
69-
]
7054
}
71-
]
55+
]

0 commit comments

Comments
 (0)