summaryrefslogtreecommitdiff
path: root/json/tests/draft3/optional
diff options
context:
space:
mode:
Diffstat (limited to 'json/tests/draft3/optional')
-rw-r--r--json/tests/draft3/optional/bignum.json107
-rw-r--r--json/tests/draft3/optional/ecmascript-regex.json18
-rw-r--r--json/tests/draft3/optional/format/color.json38
-rw-r--r--json/tests/draft3/optional/format/date-time.json38
-rw-r--r--json/tests/draft3/optional/format/date.json168
-rw-r--r--json/tests/draft3/optional/format/email.json53
-rw-r--r--json/tests/draft3/optional/format/host-name.json63
-rw-r--r--json/tests/draft3/optional/format/ip-address.json23
-rw-r--r--json/tests/draft3/optional/format/ipv6.json68
-rw-r--r--json/tests/draft3/optional/format/regex.json18
-rw-r--r--json/tests/draft3/optional/format/time.json18
-rw-r--r--json/tests/draft3/optional/format/uri.json28
-rw-r--r--json/tests/draft3/optional/non-bmp-regex.json82
-rw-r--r--json/tests/draft3/optional/zeroTerminatedFloats.json15
14 files changed, 0 insertions, 737 deletions
diff --git a/json/tests/draft3/optional/bignum.json b/json/tests/draft3/optional/bignum.json
deleted file mode 100644
index ccc7c17..0000000
--- a/json/tests/draft3/optional/bignum.json
+++ /dev/null
@@ -1,107 +0,0 @@
-[
- {
- "description": "integer",
- "schema": {"type": "integer"},
- "tests": [
- {
- "description": "a bignum is an integer",
- "data": 12345678910111213141516171819202122232425262728293031,
- "valid": true
- }
- ]
- },
- {
- "description": "number",
- "schema": {"type": "number"},
- "tests": [
- {
- "description": "a bignum is a number",
- "data": 98249283749234923498293171823948729348710298301928331,
- "valid": true
- }
- ]
- },
- {
- "description": "integer",
- "schema": {"type": "integer"},
- "tests": [
- {
- "description": "a negative bignum is an integer",
- "data": -12345678910111213141516171819202122232425262728293031,
- "valid": true
- }
- ]
- },
- {
- "description": "number",
- "schema": {"type": "number"},
- "tests": [
- {
- "description": "a negative bignum is a number",
- "data": -98249283749234923498293171823948729348710298301928331,
- "valid": true
- }
- ]
- },
- {
- "description": "string",
- "schema": {"type": "string"},
- "tests": [
- {
- "description": "a bignum is not a string",
- "data": 98249283749234923498293171823948729348710298301928331,
- "valid": false
- }
- ]
- },
- {
- "description": "integer comparison",
- "schema": {"maximum": 18446744073709551615},
- "tests": [
- {
- "description": "comparison works for high numbers",
- "data": 18446744073709551600,
- "valid": true
- }
- ]
- },
- {
- "description": "float comparison with high precision",
- "schema": {
- "maximum": 972783798187987123879878123.18878137,
- "exclusiveMaximum": true
- },
- "tests": [
- {
- "description": "comparison works for high numbers",
- "data": 972783798187987123879878123.188781371,
- "valid": false
- }
- ]
- },
- {
- "description": "integer comparison",
- "schema": {"minimum": -18446744073709551615},
- "tests": [
- {
- "description": "comparison works for very negative numbers",
- "data": -18446744073709551600,
- "valid": true
- }
- ]
- },
- {
- "description": "float comparison with high precision on negative numbers",
- "schema": {
- "minimum": -972783798187987123879878123.18878137,
- "exclusiveMinimum": true
- },
- "tests": [
- {
- "description": "comparison works for very negative numbers",
- "data": -972783798187987123879878123.188781371,
- "valid": false
- }
- ]
- }
-]
diff --git a/json/tests/draft3/optional/ecmascript-regex.json b/json/tests/draft3/optional/ecmascript-regex.json
deleted file mode 100644
index 03fe977..0000000
--- a/json/tests/draft3/optional/ecmascript-regex.json
+++ /dev/null
@@ -1,18 +0,0 @@
-[
- {
- "description": "ECMA 262 regex dialect recognition",
- "schema": { "format": "regex" },
- "tests": [
- {
- "description": "[^] is a valid regex",
- "data": "[^]",
- "valid": true
- },
- {
- "description": "ECMA 262 has no support for lookbehind",
- "data": "(?<=foo)bar",
- "valid": false
- }
- ]
- }
-]
diff --git a/json/tests/draft3/optional/format/color.json b/json/tests/draft3/optional/format/color.json
deleted file mode 100644
index 0c0b534..0000000
--- a/json/tests/draft3/optional/format/color.json
+++ /dev/null
@@ -1,38 +0,0 @@
-[
- {
- "description": "validation of CSS colors",
- "schema": { "format": "color" },
- "tests": [
- {
- "description": "a valid CSS color name",
- "data": "fuchsia",
- "valid": true
- },
- {
- "description": "a valid six-digit CSS color code",
- "data": "#CC8899",
- "valid": true
- },
- {
- "description": "a valid three-digit CSS color code",
- "data": "#C89",
- "valid": true
- },
- {
- "description": "an invalid CSS color code",
- "data": "#00332520",
- "valid": false
- },
- {
- "description": "an invalid CSS color name",
- "data": "puce",
- "valid": false
- },
- {
- "description": "a CSS color name containing invalid characters",
- "data": "light_grayish_red-violet",
- "valid": false
- }
- ]
- }
-]
diff --git a/json/tests/draft3/optional/format/date-time.json b/json/tests/draft3/optional/format/date-time.json
deleted file mode 100644
index 1f1e6fb..0000000
--- a/json/tests/draft3/optional/format/date-time.json
+++ /dev/null
@@ -1,38 +0,0 @@
-[
- {
- "description": "validation of date-time strings",
- "schema": { "format": "date-time" },
- "tests": [
- {
- "description": "a valid date-time string",
- "data": "1963-06-19T08:30:06.283185Z",
- "valid": true
- },
- {
- "description": "an invalid date-time string",
- "data": "06/19/1963 08:30:06 PST",
- "valid": false
- },
- {
- "description": "case-insensitive T and Z",
- "data": "1963-06-19t08:30:06.283185z",
- "valid": true
- },
- {
- "description": "only RFC3339 not all of ISO 8601 are valid",
- "data": "2013-350T01:01:01",
- "valid": false
- },
- {
- "description": "invalid non-padded month dates",
- "data": "1963-6-19T08:30:06.283185Z",
- "valid": false
- },
- {
- "description": "invalid non-padded day dates",
- "data": "1963-06-1T08:30:06.283185Z",
- "valid": false
- }
- ]
- }
-]
diff --git a/json/tests/draft3/optional/format/date.json b/json/tests/draft3/optional/format/date.json
deleted file mode 100644
index 796bc46..0000000
--- a/json/tests/draft3/optional/format/date.json
+++ /dev/null
@@ -1,168 +0,0 @@
-[
- {
- "description": "validation of date strings",
- "schema": { "format": "date" },
- "tests": [
- {
- "description": "a valid date string",
- "data": "1963-06-19",
- "valid": true
- },
- {
- "description": "a valid date string with 31 days in January",
- "data": "2020-01-31",
- "valid": true
- },
- {
- "description": "a invalid date string with 32 days in January",
- "data": "2020-01-32",
- "valid": false
- },
- {
- "description": "a valid date string with 28 days in February (normal)",
- "data": "2021-02-28",
- "valid": true
- },
- {
- "description": "a invalid date string with 29 days in February (normal)",
- "data": "2021-02-29",
- "valid": false
- },
- {
- "description": "a valid date string with 29 days in February (leap)",
- "data": "2020-02-29",
- "valid": true
- },
- {
- "description": "a invalid date string with 30 days in February (leap)",
- "data": "2020-02-30",
- "valid": false
- },
- {
- "description": "a valid date string with 31 days in March",
- "data": "2020-03-31",
- "valid": true
- },
- {
- "description": "a invalid date string with 32 days in March",
- "data": "2020-03-32",
- "valid": false
- },
- {
- "description": "a valid date string with 30 days in April",
- "data": "2020-04-30",
- "valid": true
- },
- {
- "description": "a invalid date string with 31 days in April",
- "data": "2020-04-31",
- "valid": false
- },
- {
- "description": "a valid date string with 31 days in May",
- "data": "2020-05-31",
- "valid": true
- },
- {
- "description": "a invalid date string with 32 days in May",
- "data": "2020-05-32",
- "valid": false
- },
- {
- "description": "a valid date string with 30 days in June",
- "data": "2020-06-30",
- "valid": true
- },
- {
- "description": "a invalid date string with 31 days in June",
- "data": "2020-06-31",
- "valid": false
- },
- {
- "description": "a valid date string with 31 days in July",
- "data": "2020-07-31",
- "valid": true
- },
- {
- "description": "a invalid date string with 32 days in July",
- "data": "2020-07-32",
- "valid": false
- },
- {
- "description": "a valid date string with 31 days in August",
- "data": "2020-08-31",
- "valid": true
- },
- {
- "description": "a invalid date string with 32 days in August",
- "data": "2020-08-32",
- "valid": false
- },
- {
- "description": "a valid date string with 30 days in September",
- "data": "2020-09-30",
- "valid": true
- },
- {
- "description": "a invalid date string with 31 days in September",
- "data": "2020-09-31",
- "valid": false
- },
- {
- "description": "a valid date string with 31 days in October",
- "data": "2020-10-31",
- "valid": true
- },
- {
- "description": "a invalid date string with 32 days in October",
- "data": "2020-10-32",
- "valid": false
- },
- {
- "description": "a valid date string with 30 days in November",
- "data": "2020-11-30",
- "valid": true
- },
- {
- "description": "a invalid date string with 31 days in November",
- "data": "2020-11-31",
- "valid": false
- },
- {
- "description": "a valid date string with 31 days in December",
- "data": "2020-12-31",
- "valid": true
- },
- {
- "description": "a invalid date string with 32 days in December",
- "data": "2020-12-32",
- "valid": false
- },
- {
- "description": "a invalid date string with invalid month",
- "data": "2020-13-01",
- "valid": false
- },
- {
- "description": "an invalid date string",
- "data": "06/19/1963",
- "valid": false
- },
- {
- "description": "only RFC3339 not all of ISO 8601 are valid",
- "data": "2013-350",
- "valid": false
- },
- {
- "description": "invalidates non-padded month dates",
- "data": "1998-1-20",
- "valid": false
- },
- {
- "description": "invalidates non-padded day dates",
- "data": "1998-01-1",
- "valid": false
- }
- ]
- }
-]
diff --git a/json/tests/draft3/optional/format/email.json b/json/tests/draft3/optional/format/email.json
deleted file mode 100644
index 059615a..0000000
--- a/json/tests/draft3/optional/format/email.json
+++ /dev/null
@@ -1,53 +0,0 @@
-[
- {
- "description": "validation of e-mail addresses",
- "schema": { "format": "email" },
- "tests": [
- {
- "description": "a valid e-mail address",
- "data": "joe.bloggs@example.com",
- "valid": true
- },
- {
- "description": "an invalid e-mail address",
- "data": "2962",
- "valid": false
- },
- {
- "description": "tilde in local part is valid",
- "data": "te~st@example.com",
- "valid": true
- },
- {
- "description": "tilde before local part is valid",
- "data": "~test@example.com",
- "valid": true
- },
- {
- "description": "tilde after local part is valid",
- "data": "test~@example.com",
- "valid": true
- },
- {
- "description": "dot before local part is not valid",
- "data": ".test@example.com",
- "valid": false
- },
- {
- "description": "dot after local part is not valid",
- "data": "test.@example.com",
- "valid": false
- },
- {
- "description": "two separated dots inside local part are valid",
- "data": "te.s.t@example.com",
- "valid": true
- },
- {
- "description": "two subsequent dots inside local part are not valid",
- "data": "te..st@example.com",
- "valid": false
- }
- ]
- }
-]
diff --git a/json/tests/draft3/optional/format/host-name.json b/json/tests/draft3/optional/format/host-name.json
deleted file mode 100644
index d418f37..0000000
--- a/json/tests/draft3/optional/format/host-name.json
+++ /dev/null
@@ -1,63 +0,0 @@
-[
- {
- "description": "validation of host names",
- "schema": { "format": "host-name" },
- "tests": [
- {
- "description": "a valid host name",
- "data": "www.example.com",
- "valid": true
- },
- {
- "description": "a host name starting with an illegal character",
- "data": "-a-host-name-that-starts-with--",
- "valid": false
- },
- {
- "description": "a host name containing illegal characters",
- "data": "not_a_valid_host_name",
- "valid": false
- },
- {
- "description": "a host name with a component too long",
- "data": "a-vvvvvvvvvvvvvvvveeeeeeeeeeeeeeeerrrrrrrrrrrrrrrryyyyyyyyyyyyyyyy-long-host-name-component",
- "valid": false
- },
- {
- "description": "starts with hyphen",
- "data": "-hostname",
- "valid": false
- },
- {
- "description": "ends with hyphen",
- "data": "hostname-",
- "valid": false
- },
- {
- "description": "starts with underscore",
- "data": "_hostname",
- "valid": false
- },
- {
- "description": "ends with underscore",
- "data": "hostname_",
- "valid": false
- },
- {
- "description": "contains underscore",
- "data": "host_name",
- "valid": false
- },
- {
- "description": "maximum label length",
- "data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.com",
- "valid": true
- },
- {
- "description": "exceeds maximum label length",
- "data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl.com",
- "valid": false
- }
- ]
- }
-]
diff --git a/json/tests/draft3/optional/format/ip-address.json b/json/tests/draft3/optional/format/ip-address.json
deleted file mode 100644
index 91cac9f..0000000
--- a/json/tests/draft3/optional/format/ip-address.json
+++ /dev/null
@@ -1,23 +0,0 @@
-[
- {
- "description": "validation of IP addresses",
- "schema": { "format": "ip-address" },
- "tests": [
- {
- "description": "a valid IP address",
- "data": "192.168.0.1",
- "valid": true
- },
- {
- "description": "an IP address with too many components",
- "data": "127.0.0.0.1",
- "valid": false
- },
- {
- "description": "an IP address with out-of-range values",
- "data": "256.256.256.256",
- "valid": false
- }
- ]
- }
-]
diff --git a/json/tests/draft3/optional/format/ipv6.json b/json/tests/draft3/optional/format/ipv6.json
deleted file mode 100644
index c3ef379..0000000
--- a/json/tests/draft3/optional/format/ipv6.json
+++ /dev/null
@@ -1,68 +0,0 @@
-[
- {
- "description": "validation of IPv6 addresses",
- "schema": { "format": "ipv6" },
- "tests": [
- {
- "description": "a valid IPv6 address",
- "data": "::1",
- "valid": true
- },
- {
- "description": "an IPv6 address with out-of-range values",
- "data": "12345::",
- "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
- },
- {
- "description": "an IPv6 address containing illegal characters",
- "data": "::laptop",
- "valid": false
- },
- {
- "description": "no digits is valid",
- "data": "::",
- "valid": true
- },
- {
- "description": "leading colons is valid",
- "data": "::1",
- "valid": true
- },
- {
- "description": "trailing colons is valid",
- "data": "d6::",
- "valid": true
- },
- {
- "description": "two sets of double colons is invalid",
- "data": "1::d6::42",
- "valid": false
- },
- {
- "description": "mixed format with the ipv4 section as decimal octets",
- "data": "1::d6:192.168.0.1",
- "valid": true
- },
- {
- "description": "mixed format with double colons between the sections",
- "data": "1:2::192.168.0.1",
- "valid": true
- },
- {
- "description": "mixed format with ipv4 section with octet out of range",
- "data": "1::2:192.168.256.1",
- "valid": false
- },
- {
- "description": "mixed format with ipv4 section with a hex octet",
- "data": "1::2:192.168.ff.1",
- "valid": false
- }
- ]
- }
-]
diff --git a/json/tests/draft3/optional/format/regex.json b/json/tests/draft3/optional/format/regex.json
deleted file mode 100644
index 8a37763..0000000
--- a/json/tests/draft3/optional/format/regex.json
+++ /dev/null
@@ -1,18 +0,0 @@
-[
- {
- "description": "validation of regular expressions",
- "schema": { "format": "regex" },
- "tests": [
- {
- "description": "a valid regular expression",
- "data": "([abc])+\\s+$",
- "valid": true
- },
- {
- "description": "a regular expression with unclosed parens is invalid",
- "data": "^(abc]",
- "valid": false
- }
- ]
- }
-]
diff --git a/json/tests/draft3/optional/format/time.json b/json/tests/draft3/optional/format/time.json
deleted file mode 100644
index 36c823e..0000000
--- a/json/tests/draft3/optional/format/time.json
+++ /dev/null
@@ -1,18 +0,0 @@
-[
- {
- "description": "validation of time strings",
- "schema": { "format": "time" },
- "tests": [
- {
- "description": "a valid time string",
- "data": "08:30:06",
- "valid": true
- },
- {
- "description": "an invalid time string",
- "data": "8:30 AM",
- "valid": false
- }
- ]
- }
-]
diff --git a/json/tests/draft3/optional/format/uri.json b/json/tests/draft3/optional/format/uri.json
deleted file mode 100644
index f024b62..0000000
--- a/json/tests/draft3/optional/format/uri.json
+++ /dev/null
@@ -1,28 +0,0 @@
-[
- {
- "description": "validation of URIs",
- "schema": { "format": "uri" },
- "tests": [
- {
- "description": "a valid URI",
- "data": "http://foo.bar/?baz=qux#quux",
- "valid": true
- },
- {
- "description": "an invalid protocol-relative URI Reference",
- "data": "//foo.bar/?baz=qux#quux",
- "valid": false
- },
- {
- "description": "an invalid URI",
- "data": "\\\\WINDOWS\\fileshare",
- "valid": false
- },
- {
- "description": "an invalid URI though valid URI reference",
- "data": "abc",
- "valid": false
- }
- ]
- }
-]
diff --git a/json/tests/draft3/optional/non-bmp-regex.json b/json/tests/draft3/optional/non-bmp-regex.json
deleted file mode 100644
index dd67af2..0000000
--- a/json/tests/draft3/optional/non-bmp-regex.json
+++ /dev/null
@@ -1,82 +0,0 @@
-[
- {
- "description": "Proper UTF-16 surrogate pair handling: pattern",
- "comment": "Optional because .Net doesn't correctly handle 32-bit Unicode characters",
- "schema": { "pattern": "^🐲*$" },
- "tests": [
- {
- "description": "matches empty",
- "data": "",
- "valid": true
- },
- {
- "description": "matches single",
- "data": "🐲",
- "valid": true
- },
- {
- "description": "matches two",
- "data": "🐲🐲",
- "valid": true
- },
- {
- "description": "doesn't match one",
- "data": "🐉",
- "valid": false
- },
- {
- "description": "doesn't match two",
- "data": "🐉🐉",
- "valid": false
- },
- {
- "description": "doesn't match one ASCII",
- "data": "D",
- "valid": false
- },
- {
- "description": "doesn't match two ASCII",
- "data": "DD",
- "valid": false
- }
- ]
- },
- {
- "description": "Proper UTF-16 surrogate pair handling: patternProperties",
- "comment": "Optional because .Net doesn't correctly handle 32-bit Unicode characters",
- "schema": {
- "patternProperties": {
- "^🐲*$": {
- "type": "integer"
- }
- }
- },
- "tests": [
- {
- "description": "matches empty",
- "data": { "": 1 },
- "valid": true
- },
- {
- "description": "matches single",
- "data": { "🐲": 1 },
- "valid": true
- },
- {
- "description": "matches two",
- "data": { "🐲🐲": 1 },
- "valid": true
- },
- {
- "description": "doesn't match one",
- "data": { "🐲": "hello" },
- "valid": false
- },
- {
- "description": "doesn't match two",
- "data": { "🐲🐲": "hello" },
- "valid": false
- }
- ]
- }
-]
diff --git a/json/tests/draft3/optional/zeroTerminatedFloats.json b/json/tests/draft3/optional/zeroTerminatedFloats.json
deleted file mode 100644
index 9b50ea2..0000000
--- a/json/tests/draft3/optional/zeroTerminatedFloats.json
+++ /dev/null
@@ -1,15 +0,0 @@
-[
- {
- "description": "some languages do not distinguish between different types of numeric value",
- "schema": {
- "type": "integer"
- },
- "tests": [
- {
- "description": "a float is not an integer even without fractional part",
- "data": 1.0,
- "valid": false
- }
- ]
- }
-]