diff options
author | Som Snytt <som.snytt@gmail.com> | 2017-02-14 01:25:10 -0800 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2017-02-14 01:25:10 -0800 |
commit | 6c713793446de4b9c3cf5479b2d21f41eff83552 (patch) | |
tree | 9fc7802747810f0bd25ecee62789dd692754511f /test/junit | |
parent | 9ea50104800be0ba200ef06cf5bd406e8f58161b (diff) | |
download | scala-6c713793446de4b9c3cf5479b2d21f41eff83552.tar.gz scala-6c713793446de4b9c3cf5479b2d21f41eff83552.tar.bz2 scala-6c713793446de4b9c3cf5479b2d21f41eff83552.zip |
SI-10164 BitSet.tail zigs where it zagged
A cut/paste issue, an increment was held over from head,
which scans forward, to tail, which scans backward.
Diffstat (limited to 'test/junit')
-rw-r--r-- | test/junit/scala/collection/mutable/BitSetTest.scala | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/junit/scala/collection/mutable/BitSetTest.scala b/test/junit/scala/collection/mutable/BitSetTest.scala index 84b906e8d5..f0a0ef5d75 100644 --- a/test/junit/scala/collection/mutable/BitSetTest.scala +++ b/test/junit/scala/collection/mutable/BitSetTest.scala @@ -7,7 +7,7 @@ import org.junit.runners.JUnit4 @RunWith(classOf[JUnit4]) class BitSetTest { // Test for SI-8910 - @Test def capacityExpansionTest() { + @Test def capacityExpansionTest(): Unit = { val bitSet = BitSet.empty val size = bitSet.toBitMask.length bitSet ^= bitSet @@ -20,7 +20,7 @@ class BitSetTest { assert(bitSet.toBitMask.length == size, "Capacity of bitset changed after &~=") } - @Test def test_SI8917() { + @Test def test_SI8917(): Unit = { val bigBitSet = BitSet(1, 100, 10000) val littleBitSet = BitSet(100) bigBitSet &= littleBitSet @@ -29,10 +29,16 @@ class BitSetTest { assert(littleBitSet.toBitMask.length < bigBitSet.toBitMask.length, "Needlessly extended the size of bitset on &=") } - @Test def test_SI8647() { + @Test def test_SI8647(): Unit = { val bs = BitSet() bs.map(_ + 1) // Just needs to compile val xs = bs: SortedSet[Int] xs.map(_ + 1) // Also should compile (did before) } + + @Test def t10164(): Unit = { + val bs = BitSet() + val last = (bs ++ (0 to 128)).last // Just needs not to throw + assert(last == 128) + } } |