@@ -64,15 +64,15 @@ class ScalarsFloatTest extends Specification {
6464 " 42" | 42d
6565 " 42.123" | 42.123d
6666 42.0000d | 42
67- new Integer (42 ) | 42
67+ Integer . valueOf (42 ) | 42
6868 " -1" | -1
6969 new BigInteger (" 42" ) | 42
7070 new BigDecimal (" 42" ) | 42
7171 new BigDecimal (" 4.2" ) | 4.2d
7272 42.3f | 42.3d
7373 42.0d | 42d
74- new Byte (" 42" ) | 42
75- new Short (" 42" ) | 42
74+ Byte . valueOf (" 42" ) | 42
75+ Short . valueOf (" 42" ) | 42
7676 1234567l | 1234567d
7777 new AtomicInteger (42 ) | 42
7878 Double . MAX_VALUE | Double . MAX_VALUE
@@ -89,15 +89,15 @@ class ScalarsFloatTest extends Specification {
8989 " 42" | 42d
9090 " 42.123" | 42.123d
9191 42.0000d | 42
92- new Integer (42 ) | 42
92+ Integer . valueOf (42 ) | 42
9393 " -1" | -1
9494 new BigInteger (" 42" ) | 42
9595 new BigDecimal (" 42" ) | 42
9696 new BigDecimal (" 4.2" ) | 4.2d
9797 42.3f | 42.3d
9898 42.0d | 42d
99- new Byte (" 42" ) | 42
100- new Short (" 42" ) | 42
99+ Byte . valueOf (" 42" ) | 42
100+ Short . valueOf (" 42" ) | 42
101101 1234567l | 1234567d
102102 new AtomicInteger (42 ) | 42
103103 Double . MAX_VALUE | Double . MAX_VALUE
@@ -137,21 +137,18 @@ class ScalarsFloatTest extends Specification {
137137 where :
138138 value | result
139139 42.0000d | 42
140- new Integer (42 ) | 42
140+ Integer . valueOf (42 ) | 42
141141 new BigInteger (" 42" ) | 42
142142 new BigDecimal (" 42" ) | 42
143143 new BigDecimal (" 4.2" ) | 4.2d
144144 42.3f | 42.3d
145145 42.0d | 42d
146- new Byte (" 42" ) | 42
147- new Short (" 42" ) | 42
146+ Byte . valueOf (" 42" ) | 42
147+ Short . valueOf (" 42" ) | 42
148148 1234567l | 1234567d
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
155152 }
156153
157154 @Unroll
@@ -162,21 +159,18 @@ class ScalarsFloatTest extends Specification {
162159 where :
163160 value | result
164161 42.0000d | 42
165- new Integer (42 ) | 42
162+ Integer . valueOf (42 ) | 42
166163 new BigInteger (" 42" ) | 42
167164 new BigDecimal (" 42" ) | 42
168165 new BigDecimal (" 4.2" ) | 4.2d
169166 42.3f | 42.3d
170167 42.0d | 42d
171- new Byte (" 42" ) | 42
172- new Short (" 42" ) | 42
168+ Byte . valueOf (" 42" ) | 42
169+ Short . valueOf (" 42" ) | 42
173170 1234567l | 1234567d
174171 new AtomicInteger (42 ) | 42
175172 Double . MAX_VALUE | Double . MAX_VALUE
176173 Double . MIN_VALUE | Double . MIN_VALUE
177- " 42" | 42d
178- " 42.123" | 42.123d
179- " -1" | -1
180174 }
181175
182176
@@ -203,6 +197,9 @@ class ScalarsFloatTest extends Specification {
203197 Float . POSITIVE_INFINITY . toString() | _
204198 Float . NEGATIVE_INFINITY | _
205199 Float . NEGATIVE_INFINITY . toString() | _
200+ " 42" | _
201+ " 42.123" | _
202+ " -1" | _
206203 }
207204
208205}
0 commit comments