From 326fa9ac4bb96a042733ad5c96ffee163895df5d Mon Sep 17 00:00:00 2001 From: Rex Kerr Date: Thu, 13 Feb 2014 15:40:18 -0800 Subject: 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). --- test/junit/scala/collection/SetMapConsistencyTest.scala | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/junit') 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 ) + } } -- cgit v1.2.3