summaryrefslogtreecommitdiff
path: root/test/files/run/iterator-concat.scala
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2014-09-05 00:24:27 -0700
committerSom Snytt <som.snytt@gmail.com>2014-11-11 07:33:52 -0800
commitda60dda202f386ed85fa15bf8fe02252d4dfb911 (patch)
treee452ff2e24d9ac3ff0c5441b269e974323e88644 /test/files/run/iterator-concat.scala
parentd28d4f49088eb5e0809cbb68655319c68e981caa (diff)
downloadscala-da60dda202f386ed85fa15bf8fe02252d4dfb911.tar.gz
scala-da60dda202f386ed85fa15bf8fe02252d4dfb911.tar.bz2
scala-da60dda202f386ed85fa15bf8fe02252d4dfb911.zip
SI-8835 Iterator tests can be junit
Without loss of generality or convenience, but helps reduce the number of files in test/files and may reduce compile times for test suite. This commit includes the fix from #3963 and an extra test of that fix that ensures the stack doesn't grow on chained drops.
Diffstat (limited to 'test/files/run/iterator-concat.scala')
-rw-r--r--test/files/run/iterator-concat.scala15
1 files changed, 0 insertions, 15 deletions
diff --git a/test/files/run/iterator-concat.scala b/test/files/run/iterator-concat.scala
deleted file mode 100644
index f11363410f..0000000000
--- a/test/files/run/iterator-concat.scala
+++ /dev/null
@@ -1,15 +0,0 @@
-object Test {
- // Create `size` Function0s, each of which evaluates to an Iterator
- // which produces 1. Then fold them over ++ to get a single iterator,
- // which should sum to "size".
- def mk(size: Int): Iterator[Int] = {
- val closures = (1 to size).toList.map(x => (() => Iterator(1)))
- closures.foldLeft(Iterator.empty: Iterator[Int])((res, f) => res ++ f())
- }
- def main(args: Array[String]): Unit = {
- println(mk(100).sum)
- println(mk(1000).sum)
- println(mk(10000).sum)
- println(mk(100000).sum)
- }
-}