From 7044ed8c1ef550e78daa7fad8fe4284993ec1cf0 Mon Sep 17 00:00:00 2001 From: Shawn Silverman Date: Wed, 22 Apr 2020 17:42:11 -0700 Subject: [PATCH] [242] Add pattern tests for numbers, objects, arrays, and null All drafts are affected. --- tests/draft2019-09/pattern.json | 27 ++++++++++++++++++++++++++- tests/draft3/pattern.json | 27 ++++++++++++++++++++++++++- tests/draft4/pattern.json | 27 ++++++++++++++++++++++++++- tests/draft6/pattern.json | 27 ++++++++++++++++++++++++++- tests/draft7/pattern.json | 27 ++++++++++++++++++++++++++- 5 files changed, 130 insertions(+), 5 deletions(-) diff --git a/tests/draft2019-09/pattern.json b/tests/draft2019-09/pattern.json index 25e72997..92db0f97 100644 --- a/tests/draft2019-09/pattern.json +++ b/tests/draft2019-09/pattern.json @@ -14,9 +14,34 @@ "valid": false }, { - "description": "ignores non-strings", + "description": "ignores booleans", "data": true, "valid": true + }, + { + "description": "ignores integers", + "data": 123, + "valid": true + }, + { + "description": "ignores floats", + "data": 1.0, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true } ] }, diff --git a/tests/draft3/pattern.json b/tests/draft3/pattern.json index 25e72997..92db0f97 100644 --- a/tests/draft3/pattern.json +++ b/tests/draft3/pattern.json @@ -14,9 +14,34 @@ "valid": false }, { - "description": "ignores non-strings", + "description": "ignores booleans", "data": true, "valid": true + }, + { + "description": "ignores integers", + "data": 123, + "valid": true + }, + { + "description": "ignores floats", + "data": 1.0, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true } ] }, diff --git a/tests/draft4/pattern.json b/tests/draft4/pattern.json index 25e72997..92db0f97 100644 --- a/tests/draft4/pattern.json +++ b/tests/draft4/pattern.json @@ -14,9 +14,34 @@ "valid": false }, { - "description": "ignores non-strings", + "description": "ignores booleans", "data": true, "valid": true + }, + { + "description": "ignores integers", + "data": 123, + "valid": true + }, + { + "description": "ignores floats", + "data": 1.0, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true } ] }, diff --git a/tests/draft6/pattern.json b/tests/draft6/pattern.json index 25e72997..92db0f97 100644 --- a/tests/draft6/pattern.json +++ b/tests/draft6/pattern.json @@ -14,9 +14,34 @@ "valid": false }, { - "description": "ignores non-strings", + "description": "ignores booleans", "data": true, "valid": true + }, + { + "description": "ignores integers", + "data": 123, + "valid": true + }, + { + "description": "ignores floats", + "data": 1.0, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true } ] }, diff --git a/tests/draft7/pattern.json b/tests/draft7/pattern.json index 25e72997..92db0f97 100644 --- a/tests/draft7/pattern.json +++ b/tests/draft7/pattern.json @@ -14,9 +14,34 @@ "valid": false }, { - "description": "ignores non-strings", + "description": "ignores booleans", "data": true, "valid": true + }, + { + "description": "ignores integers", + "data": 123, + "valid": true + }, + { + "description": "ignores floats", + "data": 1.0, + "valid": true + }, + { + "description": "ignores objects", + "data": {}, + "valid": true + }, + { + "description": "ignores arrays", + "data": [], + "valid": true + }, + { + "description": "ignores null", + "data": null, + "valid": true } ] },