aboutsummaryrefslogblamecommitdiff
path: root/tests/run/t3242b.scala
blob: 7a296aac1556b4a59b86dae3c0342d0eaaad0540 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                                     
import scala.collection.immutable._

object Test {

  def test(n: Int) = {
    var vb = new VectorBuilder[Int]
    for (i <- 0 until n)
      vb += i
    val v = vb.result
    assert(v == (0 until n), "not same as (0 until " + n + "): " + v)
  }

  def main(args: Array[String]): Unit = {
    for (i <- 0 until 2000)
      test(i)
  }
}