Skip to content

Commit 79833bb

Browse files
jgraettingerJulian
authored andcommitted
More min and maximum tests, awaiting backport.
1 parent 34efcda commit 79833bb

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

tests/draft2019-09/maximum.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,31 @@
2424
"valid": true
2525
}
2626
]
27+
},
28+
{
29+
"description": "maximum validation with unsigned integer",
30+
"schema": {"maximum": 300},
31+
"tests": [
32+
{
33+
"description": "below the maximum is invalid",
34+
"data": 299.97,
35+
"valid": true
36+
},
37+
{
38+
"description": "boundary point integer is valid",
39+
"data": 300,
40+
"valid": true
41+
},
42+
{
43+
"description": "boundary point float is valid",
44+
"data": 300.00,
45+
"valid": true
46+
},
47+
{
48+
"description": "above the maximum is invalid",
49+
"data": 300.5,
50+
"valid": false
51+
}
52+
]
2753
}
2854
]

tests/draft2019-09/minimum.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,17 @@
4545
"valid": true
4646
},
4747
{
48-
"description": "below the minimum is invalid",
48+
"description": "boundary point with float is valid",
49+
"data": -2.0,
50+
"valid": true
51+
},
52+
{
53+
"description": "float below the minimum is invalid",
54+
"data": -2.0001,
55+
"valid": false
56+
},
57+
{
58+
"description": "int below the minimum is invalid",
4959
"data": -3,
5060
"valid": false
5161
},

0 commit comments

Comments
 (0)