Skip to content

Commit 2106ed1

Browse files
committed
backport uniqueItems cases to draft3
1 parent 49fc2a9 commit 2106ed1

File tree

4 files changed

+40
-0
lines changed

4 files changed

+40
-0
lines changed

tests/draft3/uniqueItems.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,16 @@
9393
"description": "non-unique heterogeneous types are invalid",
9494
"data": [{}, [1], true, null, {}, 1],
9595
"valid": false
96+
},
97+
{
98+
"description": "{\"a\": false} and {\"a\": 0} are unique",
99+
"data": [{"a": false}, {"a": 0}],
100+
"valid": true
101+
},
102+
{
103+
"description": "{\"a\": true} and {\"a\": 1} are unique",
104+
"data": [{"a": true}, {"a": 1}],
105+
"valid": true
96106
}
97107
]
98108
},

tests/draft4/uniqueItems.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,16 @@
113113
"description": "objects are non-unique despite key order",
114114
"data": [{"a": 1, "b": 2}, {"b": 2, "a": 1}],
115115
"valid": false
116+
},
117+
{
118+
"description": "{\"a\": false} and {\"a\": 0} are unique",
119+
"data": [{"a": false}, {"a": 0}],
120+
"valid": true
121+
},
122+
{
123+
"description": "{\"a\": true} and {\"a\": 1} are unique",
124+
"data": [{"a": true}, {"a": 1}],
125+
"valid": true
116126
}
117127
]
118128
},

tests/draft6/uniqueItems.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,16 @@
113113
"description": "objects are non-unique despite key order",
114114
"data": [{"a": 1, "b": 2}, {"b": 2, "a": 1}],
115115
"valid": false
116+
},
117+
{
118+
"description": "{\"a\": false} and {\"a\": 0} are unique",
119+
"data": [{"a": false}, {"a": 0}],
120+
"valid": true
121+
},
122+
{
123+
"description": "{\"a\": true} and {\"a\": 1} are unique",
124+
"data": [{"a": true}, {"a": 1}],
125+
"valid": true
116126
}
117127
]
118128
},

tests/draft7/uniqueItems.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,16 @@
113113
"description": "objects are non-unique despite key order",
114114
"data": [{"a": 1, "b": 2}, {"b": 2, "a": 1}],
115115
"valid": false
116+
},
117+
{
118+
"description": "{\"a\": false} and {\"a\": 0} are unique",
119+
"data": [{"a": false}, {"a": 0}],
120+
"valid": true
121+
},
122+
{
123+
"description": "{\"a\": true} and {\"a\": 1} are unique",
124+
"data": [{"a": true}, {"a": 1}],
125+
"valid": true
116126
}
117127
]
118128
},

0 commit comments

Comments
 (0)