Skip to content

Commit fd01a60

Browse files
author
Alexander Ignatev
authored
Add tests for uniqueness [1] and [true]
Tests for languages in which `[1] == [true]` (e.g. Python).
1 parent 0a8823c commit fd01a60

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/draft2019-09/uniqueItems.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,26 @@
7474
"data": [0, false],
7575
"valid": true
7676
},
77+
{
78+
"description": "[1] and [true] are unique",
79+
"data": [[1], [true]],
80+
"valid": true
81+
},
82+
{
83+
"description": "[0] and [false] are unique",
84+
"data": [[0], [false]],
85+
"valid": true
86+
},
87+
{
88+
"description": "nested [1] and [true] are unique",
89+
"data": [[[1], "foo"], [[true], "foo"]],
90+
"valid": true
91+
},
92+
{
93+
"description": "nested [0] and [false] are unique",
94+
"data": [[[0], "foo"], [[false], "foo"]],
95+
"valid": true
96+
},
7797
{
7898
"description": "unique heterogeneous types are valid",
7999
"data": [{}, [1], true, null, 1],

0 commit comments

Comments
 (0)