diff options
Diffstat (limited to 'tests/run/t3242b.scala')
-rw-r--r-- | tests/run/t3242b.scala | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/run/t3242b.scala b/tests/run/t3242b.scala new file mode 100644 index 000000000..7a296aac1 --- /dev/null +++ b/tests/run/t3242b.scala @@ -0,0 +1,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) + } +} |