summaryrefslogtreecommitdiff
path: root/json/tests/draft2020-12/optional/format/duration.json
diff options
context:
space:
mode:
Diffstat (limited to 'json/tests/draft2020-12/optional/format/duration.json')
-rw-r--r--json/tests/draft2020-12/optional/format/duration.json182
1 files changed, 91 insertions, 91 deletions
diff --git a/json/tests/draft2020-12/optional/format/duration.json b/json/tests/draft2020-12/optional/format/duration.json
index 4514738..816ca4a 100644
--- a/json/tests/draft2020-12/optional/format/duration.json
+++ b/json/tests/draft2020-12/optional/format/duration.json
@@ -1,93 +1,93 @@
[
- {
- "description": "validation of duration strings",
- "schema": {"format": "duration"},
- "tests": [
- {
- "description": "a valid duration string",
- "data": "P4DT12H30M5S",
- "valid": true
- },
- {
- "description": "an invalid duration string",
- "data": "PT1D",
- "valid": false
- },
- {
- "description": "no elements present",
- "data": "P",
- "valid": false
- },
- {
- "description": "no time elements present",
- "data": "P1YT",
- "valid": false
- },
- {
- "description": "no date or time elements present",
- "data": "PT",
- "valid": false
- },
- {
- "description": "elements out of order",
- "data": "P2D1Y",
- "valid": false
- },
- {
- "description": "missing time separator",
- "data": "P1D2H",
- "valid": false
- },
- {
- "description": "time element in the date position",
- "data": "P2S",
- "valid": false
- },
- {
- "description": "four years duration",
- "data": "P4Y",
- "valid": true
- },
- {
- "description": "zero time, in seconds",
- "data": "PT0S",
- "valid": true
- },
- {
- "description": "zero time, in days",
- "data": "P0D",
- "valid": true
- },
- {
- "description": "one month duration",
- "data": "P1M",
- "valid": true
- },
- {
- "description": "one minute duration",
- "data": "PT1M",
- "valid": true
- },
- {
- "description": "one and a half days, in hours",
- "data": "PT36H",
- "valid": true
- },
- {
- "description": "one and a half days, in days and hours",
- "data": "P1DT12H",
- "valid": true
- },
- {
- "description": "two weeks",
- "data": "P2W",
- "valid": true
- },
- {
- "description": "weeks cannot be combined with other units",
- "data": "P1Y2W",
- "valid": false
- }
- ]
- }
+ {
+ "description": "validation of duration strings",
+ "schema": {"format": "duration"},
+ "tests": [
+ {
+ "description": "a valid duration string",
+ "data": "P4DT12H30M5S",
+ "valid": true
+ },
+ {
+ "description": "an invalid duration string",
+ "data": "PT1D",
+ "valid": false
+ },
+ {
+ "description": "no elements present",
+ "data": "P",
+ "valid": false
+ },
+ {
+ "description": "no time elements present",
+ "data": "P1YT",
+ "valid": false
+ },
+ {
+ "description": "no date or time elements present",
+ "data": "PT",
+ "valid": false
+ },
+ {
+ "description": "elements out of order",
+ "data": "P2D1Y",
+ "valid": false
+ },
+ {
+ "description": "missing time separator",
+ "data": "P1D2H",
+ "valid": false
+ },
+ {
+ "description": "time element in the date position",
+ "data": "P2S",
+ "valid": false
+ },
+ {
+ "description": "four years duration",
+ "data": "P4Y",
+ "valid": true
+ },
+ {
+ "description": "zero time, in seconds",
+ "data": "PT0S",
+ "valid": true
+ },
+ {
+ "description": "zero time, in days",
+ "data": "P0D",
+ "valid": true
+ },
+ {
+ "description": "one month duration",
+ "data": "P1M",
+ "valid": true
+ },
+ {
+ "description": "one minute duration",
+ "data": "PT1M",
+ "valid": true
+ },
+ {
+ "description": "one and a half days, in hours",
+ "data": "PT36H",
+ "valid": true
+ },
+ {
+ "description": "one and a half days, in days and hours",
+ "data": "P1DT12H",
+ "valid": true
+ },
+ {
+ "description": "two weeks",
+ "data": "P2W",
+ "valid": true
+ },
+ {
+ "description": "weeks cannot be combined with other units",
+ "data": "P1Y2W",
+ "valid": false
+ }
+ ]
+ }
]