summaryrefslogtreecommitdiff
path: root/test/files/run/stream-stack-overflow-filter-map.scala
diff options
context:
space:
mode:
authorPaolo Giarrusso <p.giarrusso@gmail.com>2012-08-20 22:44:49 +0200
committerPaolo Giarrusso <p.giarrusso@gmail.com>2012-08-20 22:44:49 +0200
commitbaca952d6a3953e1c3537bc1f13fa733211ec040 (patch)
treec90935c91de2836cff86d841a67812fc7069dc28 /test/files/run/stream-stack-overflow-filter-map.scala
parent631faf4094a0dc86de958c46e3e833ee0abe9db7 (diff)
downloadscala-baca952d6a3953e1c3537bc1f13fa733211ec040.tar.gz
scala-baca952d6a3953e1c3537bc1f13fa733211ec040.tar.bz2
scala-baca952d6a3953e1c3537bc1f13fa733211ec040.zip
Cleanup testcase
No need to check the output - checking programmatically that the produced streams are empty is enough.
Diffstat (limited to 'test/files/run/stream-stack-overflow-filter-map.scala')
-rw-r--r--test/files/run/stream-stack-overflow-filter-map.scala6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/files/run/stream-stack-overflow-filter-map.scala b/test/files/run/stream-stack-overflow-filter-map.scala
index e2bd47bfca..8210518d95 100644
--- a/test/files/run/stream-stack-overflow-filter-map.scala
+++ b/test/files/run/stream-stack-overflow-filter-map.scala
@@ -1,12 +1,10 @@
object Test extends App {
- //This runs fine.
val resFMap1 = (1 to 10000).toStream filter (_ => false) flatMap (Seq(_))
val resMap1 = (1 to 10000).toStream filter (_ => false) map (_ + 1)
assert(resMap1.isEmpty)
assert(resFMap1.isEmpty)
- println(resMap1)
- println(resFMap1)
- //This will cause a stack overflow
+
+ //This risks causing a stack overflow
val resFMap2 = (1 to 10000).toStream withFilter (_ => false) flatMap (Seq(_))
val resMap2 = (1 to 10000).toStream withFilter (_ => false) map (_ + 1)
assert(resMap1 == resMap2)