blob: 7a296aac1556b4a59b86dae3c0342d0eaaad0540 (
plain) (
tree)
|
|
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)
}
}
|