Skip to content

Commit f94421e

Browse files
committed
More tests around dot
1 parent 7a1fc1d commit f94421e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/junit/scala/collection/StringParsersTest.scala

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class StringParsersTest {
1313
def doubleOK(str: String): Unit = assertTrue(
1414
s"str.toDouble <> str.toDoubleOption for $str",
1515
(str.toDoubleOption, Try(str.toDouble).toOption) match {
16-
case (Some(d1), Some(d2)) if d1.isNaN && d2.isNaN => true
16+
case (Some(d1), Some(d2)) => d1.isNaN && d2.isNaN || d1 == d2
1717
case (o1, o2) => o1 == o2
1818
})
1919

@@ -242,11 +242,16 @@ class StringParsersTest {
242242
"-0x0.000000000000090000000000000000001p-1022",
243243
"-0x0.00000000000009fffffffffffffffffffffffffffffffffp-1022",
244244
"-0x0.0000000000000fffffffffffffffffffffffffffffffffffp-1022",
245+
"",
246+
".",
245247
".4",
246248
".E4",
249+
".E",
250+
".x",
251+
".1E4",
252+
"4.",
247253
"1.1E4",
248254
"1.E4",
249-
".1E4",
250255
"1E4",
251256
"E4",
252257
"0.0",

0 commit comments

Comments
 (0)