summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-01-08 06:30:54 -0800
committerJason Zaugg <jzaugg@gmail.com>2014-01-08 06:30:54 -0800
commitea4a7659f4d9fa1ff9fc8feb5c9f4db732ecb4cf (patch)
treeea2e8d4f91075e5eb417a0d660115924d8ffce02 /test
parent5ec1b9e1df1f6000b5fc943097335d34bff0c79d (diff)
parentb46d7aefd6eda36454cfd4cf339642e3c13c2022 (diff)
downloadscala-ea4a7659f4d9fa1ff9fc8feb5c9f4db732ecb4cf.tar.gz
scala-ea4a7659f4d9fa1ff9fc8feb5c9f4db732ecb4cf.tar.bz2
scala-ea4a7659f4d9fa1ff9fc8feb5c9f4db732ecb4cf.zip
Merge pull request #3325 from clhodapp/fix/double.abs
Fix (postfix abs for -0.0)
Diffstat (limited to 'test')
-rw-r--r--test/junit/scala/math/NumericTest.scala18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/junit/scala/math/NumericTest.scala b/test/junit/scala/math/NumericTest.scala
new file mode 100644
index 0000000000..4f0657f471
--- /dev/null
+++ b/test/junit/scala/math/NumericTest.scala
@@ -0,0 +1,18 @@
+
+
+import org.junit.Assert._
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.junit.runners.JUnit4
+
+@RunWith(classOf[JUnit4])
+class NumericTest {
+
+ /* Test for SI-8102 */
+ @Test
+ def testAbs {
+ assertTrue(-0.0.abs equals 0.0)
+ assertTrue(-0.0f.abs equals 0.0f)
+ }
+}
+