diff options
author | Lukas Rytz <lukas.rytz@typesafe.com> | 2014-12-04 17:55:25 +0100 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@typesafe.com> | 2014-12-04 17:55:25 +0100 |
commit | 3b1ac0671909fef8a4aef35d62a3dc7fd7d98d9d (patch) | |
tree | d35c91c8be4f39e0309ae12f6921a7992004d00c /test/junit | |
parent | 78400a1d74a44fca33d04f9d9aa68a878d286cc2 (diff) | |
parent | a151449afb247b08d470c91f090f683ebc7ba5a4 (diff) | |
download | scala-3b1ac0671909fef8a4aef35d62a3dc7fd7d98d9d.tar.gz scala-3b1ac0671909fef8a4aef35d62a3dc7fd7d98d9d.tar.bz2 scala-3b1ac0671909fef8a4aef35d62a3dc7fd7d98d9d.zip |
Merge pull request #4141 from Ichoran/issue/8970
SI-8970 hashCode of BigDecimal and Double do not match
Diffstat (limited to 'test/junit')
-rw-r--r-- | test/junit/scala/math/BigDecimalTest.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/junit/scala/math/BigDecimalTest.scala b/test/junit/scala/math/BigDecimalTest.scala index d1ba96fcc8..c7a63da890 100644 --- a/test/junit/scala/math/BigDecimalTest.scala +++ b/test/junit/scala/math/BigDecimalTest.scala @@ -222,4 +222,10 @@ class BigDecimalTest { for (a <- different; b <- different if (a ne b)) assert(a != b, "BigDecimal representations of Double mistakenly conflated") } + + // Make sure hash code agrees with decimal representation of Double + @Test + def test_SI8970() { + assert((0.1).## == BigDecimal(0.1).##) + } } |