diff options
author | Paolo Giarrusso <p.giarrusso@gmail.com> | 2012-08-20 22:44:49 +0200 |
---|---|---|
committer | Paolo Giarrusso <p.giarrusso@gmail.com> | 2012-08-22 20:39:36 +0200 |
commit | 15ed4f044f3e518f627b918df77a961bcef2f55f (patch) | |
tree | 54ef8717e9212886ab28d4ac5cfc679d71b6926e /test | |
parent | 096a08e3bddc16166c4c32a759bf6eec0638bd41 (diff) | |
download | scala-15ed4f044f3e518f627b918df77a961bcef2f55f.tar.gz scala-15ed4f044f3e518f627b918df77a961bcef2f55f.tar.bz2 scala-15ed4f044f3e518f627b918df77a961bcef2f55f.zip |
Cleanup testcase
No need to check the output - checking programmatically that the
produced streams are empty is enough.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/stream-stack-overflow-filter-map.check | 2 | ||||
-rw-r--r-- | test/files/run/stream-stack-overflow-filter-map.scala | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/test/files/run/stream-stack-overflow-filter-map.check b/test/files/run/stream-stack-overflow-filter-map.check deleted file mode 100644 index dbf856668b..0000000000 --- a/test/files/run/stream-stack-overflow-filter-map.check +++ /dev/null @@ -1,2 +0,0 @@ -Stream() -Stream() 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) |