diff options
Diffstat (limited to 'json/tests/draft2020-12/optional/format/ipv6.json')
-rw-r--r-- | json/tests/draft2020-12/optional/format/ipv6.json | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/json/tests/draft2020-12/optional/format/ipv6.json b/json/tests/draft2020-12/optional/format/ipv6.json index cf629c6..6379927 100644 --- a/json/tests/draft2020-12/optional/format/ipv6.json +++ b/json/tests/draft2020-12/optional/format/ipv6.json @@ -1,9 +1,39 @@ [ { "description": "validation of IPv6 addresses", - "schema": {"format": "ipv6"}, + "schema": { "format": "ipv6" }, "tests": [ { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, + { "description": "a valid IPv6 address", "data": "::1", "valid": true @@ -14,6 +44,16 @@ "valid": false }, { + "description": "trailing 4 hex symbols is valid", + "data": "::abef", + "valid": true + }, + { + "description": "trailing 5 hex symbols is invalid", + "data": "::abcef", + "valid": false + }, + { "description": "an IPv6 address with too many components", "data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1", "valid": false @@ -54,6 +94,11 @@ "valid": false }, { + "description": "single set of double colons in the middle is valid", + "data": "1:d6::42", + "valid": true + }, + { "description": "two sets of double colons is invalid", "data": "1::d6::42", "valid": false |