summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/files/run/streams.check1
-rw-r--r--test/files/run/streams.scala5
2 files changed, 5 insertions, 1 deletions
diff --git a/test/files/run/streams.check b/test/files/run/streams.check
index 7f894052d9..032057d4a1 100644
--- a/test/files/run/streams.check
+++ b/test/files/run/streams.check
@@ -23,3 +23,4 @@ Stream(100001, ?)
true
true
705082704
+6
diff --git a/test/files/run/streams.scala b/test/files/run/streams.scala
index 51b4e5d76c..dc5d0204ac 100644
--- a/test/files/run/streams.scala
+++ b/test/files/run/streams.scala
@@ -29,7 +29,7 @@ object Test extends App {
def powers(x: Int) = if ((x&(x-1)) == 0) Some(x) else None
println(s3.flatMap(powers).reverse.head)
- // large enough to generate StackOverflows (on most systems)
+ // large enough to generate StackOverflows (on most systems)
// unless the following methods are tail call optimized.
val size = 100000
@@ -43,4 +43,7 @@ object Test extends App {
println(Stream.from(1).take(size).foldLeft(0)(_ + _))
val arr = new Array[Int](size)
Stream.from(1).take(size).copyToArray(arr, 0)
+
+ // dropRight terminates
+ println(Stream from 1 dropRight 1000 take 3 sum)
}