Skip to content

Commit 8c2d914

Browse files
fix: move bignum-dependent multipleOf tests to optional/bignum.json
Signed-off-by: Sagar-6203620715 <sagar6203620715@gmail.com>
1 parent 601aa70 commit 8c2d914

12 files changed

Lines changed: 151 additions & 151 deletions

File tree

tests/draft2019-09/multipleOf.json

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -65,33 +65,5 @@
6565
"valid": false
6666
}
6767
]
68-
},
69-
{
70-
"description": "float division = inf",
71-
"schema": {
72-
"$schema": "https://json-schema.org/draft/2019-09/schema",
73-
"type": "integer", "multipleOf": 0.123456789
74-
},
75-
"tests": [
76-
{
77-
"description": "always invalid, but naive implementations may raise an overflow error",
78-
"data": 1e308,
79-
"valid": false
80-
}
81-
]
82-
},
83-
{
84-
"description": "small multiple of large integer",
85-
"schema": {
86-
"$schema": "https://json-schema.org/draft/2019-09/schema",
87-
"type": "integer", "multipleOf": 1e-8
88-
},
89-
"tests": [
90-
{
91-
"description": "any integer is a multiple of 1e-8",
92-
"data": 12391239123,
93-
"valid": true
94-
}
95-
]
9668
}
9769
]

tests/draft2019-09/optional/bignum.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,33 @@
106106
"valid": false
107107
}
108108
]
109+
},
110+
{
111+
"description": "float division = inf",
112+
"schema": {
113+
"$schema": "https://json-schema.org/draft/2019-09/schema",
114+
"type": "integer", "multipleOf": 0.123456789
115+
},
116+
"tests": [
117+
{
118+
"description": "always invalid, but naive implementations may raise an overflow error",
119+
"data": 1e308,
120+
"valid": false
121+
}
122+
]
123+
},
124+
{
125+
"description": "small multiple of large integer",
126+
"schema": {
127+
"$schema": "https://json-schema.org/draft/2019-09/schema",
128+
"type": "integer", "multipleOf": 1e-8
129+
},
130+
"tests": [
131+
{
132+
"description": "any integer is a multiple of 1e-8",
133+
"data": 12391239123,
134+
"valid": true
135+
}
136+
]
109137
}
110138
]

tests/draft2020-12/multipleOf.json

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -65,33 +65,5 @@
6565
"valid": false
6666
}
6767
]
68-
},
69-
{
70-
"description": "float division = inf",
71-
"schema": {
72-
"$schema": "https://json-schema.org/draft/2020-12/schema",
73-
"type": "integer", "multipleOf": 0.123456789
74-
},
75-
"tests": [
76-
{
77-
"description": "always invalid, but naive implementations may raise an overflow error",
78-
"data": 1e308,
79-
"valid": false
80-
}
81-
]
82-
},
83-
{
84-
"description": "small multiple of large integer",
85-
"schema": {
86-
"$schema": "https://json-schema.org/draft/2020-12/schema",
87-
"type": "integer", "multipleOf": 1e-8
88-
},
89-
"tests": [
90-
{
91-
"description": "any integer is a multiple of 1e-8",
92-
"data": 12391239123,
93-
"valid": true
94-
}
95-
]
9668
}
9769
]

tests/draft2020-12/optional/bignum.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,33 @@
106106
"valid": false
107107
}
108108
]
109+
},
110+
{
111+
"description": "float division = inf",
112+
"schema": {
113+
"$schema": "https://json-schema.org/draft/2020-12/schema",
114+
"type": "integer", "multipleOf": 0.123456789
115+
},
116+
"tests": [
117+
{
118+
"description": "always invalid, but naive implementations may raise an overflow error",
119+
"data": 1e308,
120+
"valid": false
121+
}
122+
]
123+
},
124+
{
125+
"description": "small multiple of large integer",
126+
"schema": {
127+
"$schema": "https://json-schema.org/draft/2020-12/schema",
128+
"type": "integer", "multipleOf": 1e-8
129+
},
130+
"tests": [
131+
{
132+
"description": "any integer is a multiple of 1e-8",
133+
"data": 12391239123,
134+
"valid": true
135+
}
136+
]
109137
}
110138
]

tests/draft4/multipleOf.json

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -56,27 +56,5 @@
5656
"valid": false
5757
}
5858
]
59-
},
60-
{
61-
"description": "float division = inf",
62-
"schema": {"type": "integer", "multipleOf": 0.123456789},
63-
"tests": [
64-
{
65-
"description": "invalid, but naive implementations may raise an overflow error",
66-
"data": 1e308,
67-
"valid": false
68-
}
69-
]
70-
},
71-
{
72-
"description": "small multiple of large integer",
73-
"schema": {"type": "integer", "multipleOf": 1e-8},
74-
"tests": [
75-
{
76-
"description": "any integer is a multiple of 1e-8",
77-
"data": 12391239123,
78-
"valid": true
79-
}
80-
]
8159
}
8260
]

tests/draft4/optional/bignum.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,5 +91,27 @@
9191
"valid": false
9292
}
9393
]
94+
},
95+
{
96+
"description": "float division = inf",
97+
"schema": {"type": "integer", "multipleOf": 0.123456789},
98+
"tests": [
99+
{
100+
"description": "invalid, but naive implementations may raise an overflow error",
101+
"data": 1e308,
102+
"valid": false
103+
}
104+
]
105+
},
106+
{
107+
"description": "small multiple of large integer",
108+
"schema": {"type": "integer", "multipleOf": 1e-8},
109+
"tests": [
110+
{
111+
"description": "any integer is a multiple of 1e-8",
112+
"data": 12391239123,
113+
"valid": true
114+
}
115+
]
94116
}
95117
]

tests/draft6/multipleOf.json

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -56,27 +56,5 @@
5656
"valid": false
5757
}
5858
]
59-
},
60-
{
61-
"description": "float division = inf",
62-
"schema": {"type": "integer", "multipleOf": 0.123456789},
63-
"tests": [
64-
{
65-
"description": "always invalid, but naive implementations may raise an overflow error",
66-
"data": 1e308,
67-
"valid": false
68-
}
69-
]
70-
},
71-
{
72-
"description": "small multiple of large integer",
73-
"schema": {"type": "integer", "multipleOf": 1e-8},
74-
"tests": [
75-
{
76-
"description": "any integer is a multiple of 1e-8",
77-
"data": 12391239123,
78-
"valid": true
79-
}
80-
]
8159
}
8260
]

tests/draft6/optional/bignum.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,27 @@
8989
"valid": false
9090
}
9191
]
92+
},
93+
{
94+
"description": "float division = inf",
95+
"schema": {"type": "integer", "multipleOf": 0.123456789},
96+
"tests": [
97+
{
98+
"description": "always invalid, but naive implementations may raise an overflow error",
99+
"data": 1e308,
100+
"valid": false
101+
}
102+
]
103+
},
104+
{
105+
"description": "small multiple of large integer",
106+
"schema": {"type": "integer", "multipleOf": 1e-8},
107+
"tests": [
108+
{
109+
"description": "any integer is a multiple of 1e-8",
110+
"data": 12391239123,
111+
"valid": true
112+
}
113+
]
92114
}
93115
]

tests/draft7/multipleOf.json

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -56,27 +56,5 @@
5656
"valid": false
5757
}
5858
]
59-
},
60-
{
61-
"description": "float division = inf",
62-
"schema": {"type": "integer", "multipleOf": 0.123456789},
63-
"tests": [
64-
{
65-
"description": "always invalid, but naive implementations may raise an overflow error",
66-
"data": 1e308,
67-
"valid": false
68-
}
69-
]
70-
},
71-
{
72-
"description": "small multiple of large integer",
73-
"schema": {"type": "integer", "multipleOf": 1e-8},
74-
"tests": [
75-
{
76-
"description": "any integer is a multiple of 1e-8",
77-
"data": 12391239123,
78-
"valid": true
79-
}
80-
]
8159
}
8260
]

tests/draft7/optional/bignum.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,27 @@
8989
"valid": false
9090
}
9191
]
92+
},
93+
{
94+
"description": "float division = inf",
95+
"schema": {"type": "integer", "multipleOf": 0.123456789},
96+
"tests": [
97+
{
98+
"description": "always invalid, but naive implementations may raise an overflow error",
99+
"data": 1e308,
100+
"valid": false
101+
}
102+
]
103+
},
104+
{
105+
"description": "small multiple of large integer",
106+
"schema": {"type": "integer", "multipleOf": 1e-8},
107+
"tests": [
108+
{
109+
"description": "any integer is a multiple of 1e-8",
110+
"data": 12391239123,
111+
"valid": true
112+
}
113+
]
92114
}
93115
]

0 commit comments

Comments
 (0)