diff options
author | Lukas Rytz <lukas.rytz@typesafe.com> | 2014-09-16 11:32:39 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@typesafe.com> | 2014-09-16 11:32:39 +0200 |
commit | 75f1235bb06185865c54ae811f412c659b82597f (patch) | |
tree | 56a3a318d023b0982305ed438c3fe2b8870e2213 /test | |
parent | eb5d0a6b31e2f2c5c8a7505232cfc648f581af71 (diff) | |
parent | 1da69e82a1ccf2327b337068de1209d772cb6b52 (diff) | |
download | scala-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.scala | 15 |
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) + } } |