Skip to content

Commit 71f55b3

Browse files
committed
1.0 being an integer is not optional behavior.
Move the tests from zeroTerminatedFloat.json to type, since as of draft 6, this behavior is required, and required to consider such numbers to be integers. See json-schema-org/json-schema-spec#898 for some discussion, not of the underlying requirement, simply of this file being in the wrong place.
1 parent 240fbf6 commit 71f55b3

File tree

6 files changed

+15
-45
lines changed

6 files changed

+15
-45
lines changed

tests/draft2019-09/optional/zeroTerminatedFloats.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

tests/draft2019-09/type.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
"data": 1,
99
"valid": true
1010
},
11+
{
12+
"description": "a float with zero fractional part is an integer",
13+
"data": 1.0,
14+
"valid": true
15+
},
1116
{
1217
"description": "a float is not an integer",
1318
"data": 1.1,

tests/draft6/optional/zeroTerminatedFloats.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

tests/draft6/type.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
"data": 1,
99
"valid": true
1010
},
11+
{
12+
"description": "a float with zero fractional part is an integer",
13+
"data": 1.0,
14+
"valid": true
15+
},
1116
{
1217
"description": "a float is not an integer",
1318
"data": 1.1,

tests/draft7/optional/zeroTerminatedFloats.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

tests/draft7/type.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
"data": 1,
99
"valid": true
1010
},
11+
{
12+
"description": "a float with zero fractional part is an integer",
13+
"data": 1.0,
14+
"valid": true
15+
},
1116
{
1217
"description": "a float is not an integer",
1318
"data": 1.1,

0 commit comments

Comments
 (0)