Skip to content

Commit 2e0e86e

Browse files
jgraettingerJulian
authored andcommitted
add more zero-valued types const tests
1 parent e76e029 commit 2e0e86e

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

tests/draft2019-09/const.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
]
127127
},
128128
{
129-
"description": "const with 0 does not match false",
129+
"description": "const with 0 does not match other zero-like types",
130130
"schema": {"const": 0},
131131
"tests": [
132132
{
@@ -143,6 +143,21 @@
143143
"description": "float zero is valid",
144144
"data": 0.0,
145145
"valid": true
146+
},
147+
{
148+
"description": "empty object is invalid",
149+
"data": {},
150+
"valid": false
151+
},
152+
{
153+
"description": "empty array is invalid",
154+
"data": [],
155+
"valid": false
156+
},
157+
{
158+
"description": "empty string is invalid",
159+
"data": "",
160+
"valid": false
146161
}
147162
]
148163
},

0 commit comments

Comments
 (0)