diff --git a/tests/draft-next/uniqueItems.json b/tests/draft-next/uniqueItems.json index b3762cbf1..85c619d99 100644 --- a/tests/draft-next/uniqueItems.json +++ b/tests/draft-next/uniqueItems.json @@ -13,6 +13,11 @@ "data": [1, 1], "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], @@ -28,6 +33,16 @@ "data": [1, true], "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"}], @@ -64,6 +79,11 @@ "data": [["foo"], ["foo"]], "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], diff --git a/tests/draft2019-09/uniqueItems.json b/tests/draft2019-09/uniqueItems.json index 4846c7735..2ccf666d7 100644 --- a/tests/draft2019-09/uniqueItems.json +++ b/tests/draft2019-09/uniqueItems.json @@ -13,6 +13,11 @@ "data": [1, 1], "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], @@ -28,6 +33,16 @@ "data": [1, true], "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"}], @@ -64,6 +79,11 @@ "data": [["foo"], ["foo"]], "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], diff --git a/tests/draft2020-12/uniqueItems.json b/tests/draft2020-12/uniqueItems.json index b3762cbf1..85c619d99 100644 --- a/tests/draft2020-12/uniqueItems.json +++ b/tests/draft2020-12/uniqueItems.json @@ -13,6 +13,11 @@ "data": [1, 1], "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], @@ -28,6 +33,16 @@ "data": [1, true], "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"}], @@ -64,6 +79,11 @@ "data": [["foo"], ["foo"]], "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], diff --git a/tests/draft3/uniqueItems.json b/tests/draft3/uniqueItems.json index fd4b84974..c48c6a064 100644 --- a/tests/draft3/uniqueItems.json +++ b/tests/draft3/uniqueItems.json @@ -13,11 +13,26 @@ "data": [1, 1], "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"}], @@ -54,6 +69,11 @@ "data": [["foo"], ["foo"]], "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], diff --git a/tests/draft4/uniqueItems.json b/tests/draft4/uniqueItems.json index 4846c7735..2ccf666d7 100644 --- a/tests/draft4/uniqueItems.json +++ b/tests/draft4/uniqueItems.json @@ -13,6 +13,11 @@ "data": [1, 1], "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], @@ -28,6 +33,16 @@ "data": [1, true], "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"}], @@ -64,6 +79,11 @@ "data": [["foo"], ["foo"]], "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], diff --git a/tests/draft6/uniqueItems.json b/tests/draft6/uniqueItems.json index 4846c7735..2ccf666d7 100644 --- a/tests/draft6/uniqueItems.json +++ b/tests/draft6/uniqueItems.json @@ -13,6 +13,11 @@ "data": [1, 1], "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], @@ -28,6 +33,16 @@ "data": [1, true], "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"}], @@ -64,6 +79,11 @@ "data": [["foo"], ["foo"]], "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], diff --git a/tests/draft7/uniqueItems.json b/tests/draft7/uniqueItems.json index 4846c7735..2ccf666d7 100644 --- a/tests/draft7/uniqueItems.json +++ b/tests/draft7/uniqueItems.json @@ -13,6 +13,11 @@ "data": [1, 1], "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], @@ -28,6 +33,16 @@ "data": [1, true], "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"}], @@ -64,6 +79,11 @@ "data": [["foo"], ["foo"]], "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],