diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/junit/scala/runtime/ScalaRunTimeTest.scala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/junit/scala/runtime/ScalaRunTimeTest.scala b/test/junit/scala/runtime/ScalaRunTimeTest.scala index 5bfb12610e..9efbdd44de 100644 --- a/test/junit/scala/runtime/ScalaRunTimeTest.scala +++ b/test/junit/scala/runtime/ScalaRunTimeTest.scala @@ -9,6 +9,14 @@ import org.junit.runners.JUnit4 @RunWith(classOf[JUnit4]) class ScalaRunTimeTest { @Test + def hashConsistentWithStaticsHash(): Unit = { + val problematicValue: Double = -Math.pow(2, 53) + 1 + val scalaRunTimeHash = ScalaRunTime.hash(problematicValue) + val staticsHash = Statics.anyHash(problematicValue) + assertEquals(scalaRunTimeHash, staticsHash) + } + + @Test def testStingOf() { import ScalaRunTime.stringOf import scala.collection._ |