Skip to content

Commit 64a9204

Browse files
committed
Add tests to revert stricter parseValue coercion for Float
1 parent 753c2ec commit 64a9204

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/test/groovy/graphql/ScalarsFloatTest.groovy

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ class ScalarsFloatTest extends Specification {
149149
new AtomicInteger(42) | 42
150150
Double.MAX_VALUE | Double.MAX_VALUE
151151
Double.MIN_VALUE | Double.MIN_VALUE
152+
"42" | 42d
153+
"42.123" | 42.123d
154+
"-1" | -1
152155
}
153156

154157
@Unroll
@@ -171,6 +174,9 @@ class ScalarsFloatTest extends Specification {
171174
new AtomicInteger(42) | 42
172175
Double.MAX_VALUE | Double.MAX_VALUE
173176
Double.MIN_VALUE | Double.MIN_VALUE
177+
"42" | 42d
178+
"42.123" | 42.123d
179+
"-1" | -1
174180
}
175181

176182

@@ -197,9 +203,6 @@ class ScalarsFloatTest extends Specification {
197203
Float.POSITIVE_INFINITY.toString() | _
198204
Float.NEGATIVE_INFINITY | _
199205
Float.NEGATIVE_INFINITY.toString() | _
200-
"42" | _
201-
"42.123" | _
202-
"-1" | _
203206
}
204207

205208
}

0 commit comments

Comments
 (0)