summaryrefslogtreecommitdiff
path: root/json/tests/draft6/optional/format/ipv6.json
diff options
context:
space:
mode:
Diffstat (limited to 'json/tests/draft6/optional/format/ipv6.json')
-rw-r--r--json/tests/draft6/optional/format/ipv6.json47
1 files changed, 46 insertions, 1 deletions
diff --git a/json/tests/draft6/optional/format/ipv6.json b/json/tests/draft6/optional/format/ipv6.json
index cf629c6..6379927 100644
--- a/json/tests/draft6/optional/format/ipv6.json
+++ b/json/tests/draft6/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