diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2015-02-19 10:24:50 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2015-02-19 10:24:50 -0800 |
commit | d93fc01d58f4b2f20cd4d631d1a72fcd0e1aa438 (patch) | |
tree | 6077001dca401dda2aa76493e87432ba7ad522d1 /test | |
parent | 812790a2dc4f961bbc8706a9e8a63887172057df (diff) | |
parent | c9930bfaf28093fe419de3cf034b4bf7888b3818 (diff) | |
download | scala-d93fc01d58f4b2f20cd4d631d1a72fcd0e1aa438.tar.gz scala-d93fc01d58f4b2f20cd4d631d1a72fcd0e1aa438.tar.bz2 scala-d93fc01d58f4b2f20cd4d631d1a72fcd0e1aa438.zip |
Merge pull request #4330 from Ichoran/issue/8917
SI-8917 collection.mutable.BitSet's &= operator doesn't clear end
Diffstat (limited to 'test')
-rw-r--r-- | test/junit/scala/collection/mutable/BitSetTest.scala | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/junit/scala/collection/mutable/BitSetTest.scala b/test/junit/scala/collection/mutable/BitSetTest.scala index 8d164b50d4..d56cc45601 100644 --- a/test/junit/scala/collection/mutable/BitSetTest.scala +++ b/test/junit/scala/collection/mutable/BitSetTest.scala @@ -19,4 +19,13 @@ class BitSetTest { bitSet &~= bitSet assert(bitSet.toBitMask.length == size, "Capacity of bitset changed after &~=") } + + @Test def test_SI8917() { + val bigBitSet = BitSet(1, 100, 10000) + val littleBitSet = BitSet(100) + bigBitSet &= littleBitSet + assert(!(bigBitSet contains 10000), "&= not applied to the full bitset") + littleBitSet &= bigBitSet + assert(littleBitSet.toBitMask.length < bigBitSet.toBitMask.length, "Needlessly extended the size of bitset on &=") + } } |