summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@typesafe.com>2014-09-16 11:32:39 +0200
committerLukas Rytz <lukas.rytz@typesafe.com>2014-09-16 11:32:39 +0200
commit75f1235bb06185865c54ae811f412c659b82597f (patch)
tree56a3a318d023b0982305ed438c3fe2b8870e2213 /test
parenteb5d0a6b31e2f2c5c8a7505232cfc648f581af71 (diff)
parent1da69e82a1ccf2327b337068de1209d772cb6b52 (diff)
downloadscala-75f1235bb06185865c54ae811f412c659b82597f.tar.gz
scala-75f1235bb06185865c54ae811f412c659b82597f.tar.bz2
scala-75f1235bb06185865c54ae811f412c659b82597f.zip
Merge pull request #3941 from Ichoran/issue/8815
SI-8815 mutable.LongMap makes different choices for splitAt vs etc.
Diffstat (limited to 'test')
-rw-r--r--test/junit/scala/collection/SetMapConsistencyTest.scala15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/junit/scala/collection/SetMapConsistencyTest.scala b/test/junit/scala/collection/SetMapConsistencyTest.scala
index eed6007eef..261c11a98b 100644
--- a/test/junit/scala/collection/SetMapConsistencyTest.scala
+++ b/test/junit/scala/collection/SetMapConsistencyTest.scala
@@ -514,4 +514,19 @@ class SetMapConsistencyTest {
assert( hs.toList.toSet == hs )
assert( hs == hs.toList.toSet )
}
+
+ @Test
+ def testSI8815() {
+ val lm = new scala.collection.mutable.LongMap[String]
+ lm += (Long.MinValue, "min")
+ lm += (-1, "neg-one")
+ lm += (0, "zero")
+ lm += (Long.MaxValue, "max")
+ var nit = 0
+ lm.iterator.foreach(_ => nit += 1)
+ var nfe = 0
+ lm.foreach(_ => nfe += 1)
+ assert(nit == 4)
+ assert(nfe == 4)
+ }
}