summaryrefslogtreecommitdiff
path: root/json/tests/draft2019-09/optional/format/duration.json
diff options
context:
space:
mode:
Diffstat (limited to 'json/tests/draft2019-09/optional/format/duration.json')
-rw-r--r--json/tests/draft2019-09/optional/format/duration.json32
1 files changed, 31 insertions, 1 deletions
diff --git a/json/tests/draft2019-09/optional/format/duration.json b/json/tests/draft2019-09/optional/format/duration.json
index eb33dbb..741348a 100644
--- a/json/tests/draft2019-09/optional/format/duration.json
+++ b/json/tests/draft2019-09/optional/format/duration.json
@@ -1,9 +1,39 @@
[
{
"description": "validation of duration strings",
- "schema": {"format": "duration"},
+ "schema": { "format": "duration" },
"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 duration string",
"data": "P4DT12H30M5S",
"valid": true