summaryrefslogtreecommitdiff
path: root/test/files/run/t4294.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-03-02 05:53:44 +0000
committerPaul Phillips <paulp@improving.org>2011-03-02 05:53:44 +0000
commitba1312d195d768308602faf8ed731c0a4c305703 (patch)
tree8bc8cd6ba1dd9df87bd8c88e7039caf5482767f1 /test/files/run/t4294.scala
parent8f0878683ab1540083586f11b9ba74d0fd37450a (diff)
downloadscala-ba1312d195d768308602faf8ed731c0a4c305703.tar.gz
scala-ba1312d195d768308602faf8ed731c0a4c305703.tar.bz2
scala-ba1312d195d768308602faf8ed731c0a4c305703.zip
Made Stream.collect collect instead of filter.
Glad to see there was a test case; but we have to push harder when writing tests to include the key characteristics of the function being tested. No review.
Diffstat (limited to 'test/files/run/t4294.scala')
-rw-r--r--test/files/run/t4294.scala6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/files/run/t4294.scala b/test/files/run/t4294.scala
index 588fa90f76..50c83ac819 100644
--- a/test/files/run/t4294.scala
+++ b/test/files/run/t4294.scala
@@ -1,9 +1,7 @@
-
-
-
-
object Test {
def main(args: Array[String]) {
(Stream.from(1).collect{case x if x > 5000000 => x}: Stream[Int])
+
+ assert((Stream from 1 take 10 collect { case x if x <= 3 => x*x }).sum == 14)
}
}