summaryrefslogtreecommitdiff
path: root/test/junit
diff options
context:
space:
mode:
authorRex Kerr <ichoran@gmail.com>2014-02-13 15:40:18 -0800
committerRex Kerr <ichoran@gmail.com>2014-02-14 17:09:52 -0800
commit326fa9ac4bb96a042733ad5c96ffee163895df5d (patch)
treec6bcf6e5af9386432404e8f7e6162beec842c798 /test/junit
parentc83e01d47d941265fa5415c0f29a884c904fdfa0 (diff)
downloadscala-326fa9ac4bb96a042733ad5c96ffee163895df5d.tar.gz
scala-326fa9ac4bb96a042733ad5c96ffee163895df5d.tar.bz2
scala-326fa9ac4bb96a042733ad5c96ffee163895df5d.zip
SI-8264 scala.collection.immutable.HashSet#- returns broken Set
Was an error in HashSet's handling of removal of an element when a HashTrieSet should turn into a HashSet1. Also slightly modified HashMap's filter0 to more closely match HashSet (by adding the same comment).
Diffstat (limited to 'test/junit')
-rw-r--r--test/junit/scala/collection/SetMapConsistencyTest.scala7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/junit/scala/collection/SetMapConsistencyTest.scala b/test/junit/scala/collection/SetMapConsistencyTest.scala
index 0d6f43db06..eed6007eef 100644
--- a/test/junit/scala/collection/SetMapConsistencyTest.scala
+++ b/test/junit/scala/collection/SetMapConsistencyTest.scala
@@ -507,4 +507,11 @@ class SetMapConsistencyTest {
case _ => true
})
}
+
+ @Test
+ def testSI8264() {
+ val hs = Set(-2147483648, 1, -45023380, -1, 1971207058, -54312241, -234243394) - -1
+ assert( hs.toList.toSet == hs )
+ assert( hs == hs.toList.toSet )
+ }
}