summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/draft-next/uniqueItems.json20
-rw-r--r--tests/draft2019-09/uniqueItems.json20
-rw-r--r--tests/draft2020-12/uniqueItems.json20
-rw-r--r--tests/draft3/uniqueItems.json20
-rw-r--r--tests/draft4/uniqueItems.json20
-rw-r--r--tests/draft6/uniqueItems.json20
-rw-r--r--tests/draft7/uniqueItems.json20
7 files changed, 140 insertions, 0 deletions
diff --git a/tests/draft-next/uniqueItems.json b/tests/draft-next/uniqueItems.json
index b3762cb..85c619d 100644
--- a/tests/draft-next/uniqueItems.json
+++ b/tests/draft-next/uniqueItems.json
@@ -14,6 +14,11 @@
"valid": false
},
{
+ "description": "non-unique array of more than two integers is invalid",
+ "data": [1, 2, 1],
+ "valid": false
+ },
+ {
"description": "numbers are unique if mathematically unequal",
"data": [1.0, 1.00, 1],
"valid": false
@@ -29,6 +34,16 @@
"valid": true
},
{
+ "description": "unique array of strings is valid",
+ "data": ["foo", "bar", "baz"],
+ "valid": true
+ },
+ {
+ "description": "non-unique array of strings is invalid",
+ "data": ["foo", "bar", "foo"],
+ "valid": false
+ },
+ {
"description": "unique array of objects is valid",
"data": [{"foo": "bar"}, {"foo": "baz"}],
"valid": true
@@ -65,6 +80,11 @@
"valid": false
},
{
+ "description": "non-unique array of more than two arrays is invalid",
+ "data": [["foo"], ["bar"], ["foo"]],
+ "valid": false
+ },
+ {
"description": "1 and true are unique",
"data": [1, true],
"valid": true
diff --git a/tests/draft2019-09/uniqueItems.json b/tests/draft2019-09/uniqueItems.json
index 4846c77..2ccf666 100644
--- a/tests/draft2019-09/uniqueItems.json
+++ b/tests/draft2019-09/uniqueItems.json
@@ -14,6 +14,11 @@
"valid": false
},
{
+ "description": "non-unique array of more than two integers is invalid",
+ "data": [1, 2, 1],
+ "valid": false
+ },
+ {
"description": "numbers are unique if mathematically unequal",
"data": [1.0, 1.00, 1],
"valid": false
@@ -29,6 +34,16 @@
"valid": true
},
{
+ "description": "unique array of strings is valid",
+ "data": ["foo", "bar", "baz"],
+ "valid": true
+ },
+ {
+ "description": "non-unique array of strings is invalid",
+ "data": ["foo", "bar", "foo"],
+ "valid": false
+ },
+ {
"description": "unique array of objects is valid",
"data": [{"foo": "bar"}, {"foo": "baz"}],
"valid": true
@@ -65,6 +80,11 @@
"valid": false
},
{
+ "description": "non-unique array of more than two arrays is invalid",
+ "data": [["foo"], ["bar"], ["foo"]],
+ "valid": false
+ },
+ {
"description": "1 and true are unique",
"data": [1, true],
"valid": true
diff --git a/tests/draft2020-12/uniqueItems.json b/tests/draft2020-12/uniqueItems.json
index b3762cb..85c619d 100644
--- a/tests/draft2020-12/uniqueItems.json
+++ b/tests/draft2020-12/uniqueItems.json
@@ -14,6 +14,11 @@
"valid": false
},
{
+ "description": "non-unique array of more than two integers is invalid",
+ "data": [1, 2, 1],
+ "valid": false
+ },
+ {
"description": "numbers are unique if mathematically unequal",
"data": [1.0, 1.00, 1],
"valid": false
@@ -29,6 +34,16 @@
"valid": true
},
{
+ "description": "unique array of strings is valid",
+ "data": ["foo", "bar", "baz"],
+ "valid": true
+ },
+ {
+ "description": "non-unique array of strings is invalid",
+ "data": ["foo", "bar", "foo"],
+ "valid": false
+ },
+ {
"description": "unique array of objects is valid",
"data": [{"foo": "bar"}, {"foo": "baz"}],
"valid": true
@@ -65,6 +80,11 @@
"valid": false
},
{
+ "description": "non-unique array of more than two arrays is invalid",
+ "data": [["foo"], ["bar"], ["foo"]],
+ "valid": false
+ },
+ {
"description": "1 and true are unique",
"data": [1, true],
"valid": true
diff --git a/tests/draft3/uniqueItems.json b/tests/draft3/uniqueItems.json
index fd4b849..c48c6a0 100644
--- a/tests/draft3/uniqueItems.json
+++ b/tests/draft3/uniqueItems.json
@@ -14,11 +14,26 @@
"valid": false
},
{
+ "description": "non-unique array of more than two integers is invalid",
+ "data": [1, 2, 1],
+ "valid": false
+ },
+ {
"description": "numbers are unique if mathematically unequal",
"data": [1.0, 1.00, 1],
"valid": false
},
{
+ "description": "unique array of strings is valid",
+ "data": ["foo", "bar", "baz"],
+ "valid": true
+ },
+ {
+ "description": "non-unique array of strings is invalid",
+ "data": ["foo", "bar", "foo"],
+ "valid": false
+ },
+ {
"description": "unique array of objects is valid",
"data": [{"foo": "bar"}, {"foo": "baz"}],
"valid": true
@@ -55,6 +70,11 @@
"valid": false
},
{
+ "description": "non-unique array of more than two arrays is invalid",
+ "data": [["foo"], ["bar"], ["foo"]],
+ "valid": false
+ },
+ {
"description": "1 and true are unique",
"data": [1, true],
"valid": true
diff --git a/tests/draft4/uniqueItems.json b/tests/draft4/uniqueItems.json
index 4846c77..2ccf666 100644
--- a/tests/draft4/uniqueItems.json
+++ b/tests/draft4/uniqueItems.json
@@ -14,6 +14,11 @@
"valid": false
},
{
+ "description": "non-unique array of more than two integers is invalid",
+ "data": [1, 2, 1],
+ "valid": false
+ },
+ {
"description": "numbers are unique if mathematically unequal",
"data": [1.0, 1.00, 1],
"valid": false
@@ -29,6 +34,16 @@
"valid": true
},
{
+ "description": "unique array of strings is valid",
+ "data": ["foo", "bar", "baz"],
+ "valid": true
+ },
+ {
+ "description": "non-unique array of strings is invalid",
+ "data": ["foo", "bar", "foo"],
+ "valid": false
+ },
+ {
"description": "unique array of objects is valid",
"data": [{"foo": "bar"}, {"foo": "baz"}],
"valid": true
@@ -65,6 +80,11 @@
"valid": false
},
{
+ "description": "non-unique array of more than two arrays is invalid",
+ "data": [["foo"], ["bar"], ["foo"]],
+ "valid": false
+ },
+ {
"description": "1 and true are unique",
"data": [1, true],
"valid": true
diff --git a/tests/draft6/uniqueItems.json b/tests/draft6/uniqueItems.json
index 4846c77..2ccf666 100644
--- a/tests/draft6/uniqueItems.json
+++ b/tests/draft6/uniqueItems.json
@@ -14,6 +14,11 @@
"valid": false
},
{
+ "description": "non-unique array of more than two integers is invalid",
+ "data": [1, 2, 1],
+ "valid": false
+ },
+ {
"description": "numbers are unique if mathematically unequal",
"data": [1.0, 1.00, 1],
"valid": false
@@ -29,6 +34,16 @@
"valid": true
},
{
+ "description": "unique array of strings is valid",
+ "data": ["foo", "bar", "baz"],
+ "valid": true
+ },
+ {
+ "description": "non-unique array of strings is invalid",
+ "data": ["foo", "bar", "foo"],
+ "valid": false
+ },
+ {
"description": "unique array of objects is valid",
"data": [{"foo": "bar"}, {"foo": "baz"}],
"valid": true
@@ -65,6 +80,11 @@
"valid": false
},
{
+ "description": "non-unique array of more than two arrays is invalid",
+ "data": [["foo"], ["bar"], ["foo"]],
+ "valid": false
+ },
+ {
"description": "1 and true are unique",
"data": [1, true],
"valid": true
diff --git a/tests/draft7/uniqueItems.json b/tests/draft7/uniqueItems.json
index 4846c77..2ccf666 100644
--- a/tests/draft7/uniqueItems.json
+++ b/tests/draft7/uniqueItems.json
@@ -14,6 +14,11 @@
"valid": false
},
{
+ "description": "non-unique array of more than two integers is invalid",
+ "data": [1, 2, 1],
+ "valid": false
+ },
+ {
"description": "numbers are unique if mathematically unequal",
"data": [1.0, 1.00, 1],
"valid": false
@@ -29,6 +34,16 @@
"valid": true
},
{
+ "description": "unique array of strings is valid",
+ "data": ["foo", "bar", "baz"],
+ "valid": true
+ },
+ {
+ "description": "non-unique array of strings is invalid",
+ "data": ["foo", "bar", "foo"],
+ "valid": false
+ },
+ {
"description": "unique array of objects is valid",
"data": [{"foo": "bar"}, {"foo": "baz"}],
"valid": true
@@ -65,6 +80,11 @@
"valid": false
},
{
+ "description": "non-unique array of more than two arrays is invalid",
+ "data": [["foo"], ["bar"], ["foo"]],
+ "valid": false
+ },
+ {
"description": "1 and true are unique",
"data": [1, true],
"valid": true