diff options
author | michelou <michelou@epfl.ch> | 2007-10-08 10:22:30 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2007-10-08 10:22:30 +0000 |
commit | 9ce1dd8d50095a64a68bc86d5f5a856209eaf1f2 (patch) | |
tree | 0d1d3d325247ccb677f294a46db8ffcfe6b36395 /test/files/run | |
parent | 4f2d5e48086568a905b1eb318700ef4fb6dad1df (diff) | |
download | scala-9ce1dd8d50095a64a68bc86d5f5a856209eaf1f2.tar.gz scala-9ce1dd8d50095a64a68bc86d5f5a856209eaf1f2.tar.bz2 scala-9ce1dd8d50095a64a68bc86d5f5a856209eaf1f2.zip |
added length test to run/stream.scala
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/streams.check | 1 | ||||
-rw-r--r-- | test/files/run/streams.scala | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/test/files/run/streams.check b/test/files/run/streams.check index d11eb7f67a..f36b719ac1 100644 --- a/test/files/run/streams.check +++ b/test/files/run/streams.check @@ -15,4 +15,5 @@ Stream() Stream(1, 2) Stream() +99999 65536 diff --git a/test/files/run/streams.scala b/test/files/run/streams.scala index 408affe306..1844fdb6ab 100644 --- a/test/files/run/streams.scala +++ b/test/files/run/streams.scala @@ -22,8 +22,11 @@ object Test extends Application { println(s2.dropWhile(_ > 0)) println + val s3 = Stream.range(1, 100000) + println(s3.length) + // ticket #153 def powers(x: Int) = if ((x&(x-1)) == 0) Some(x) else None - val s3 = Stream.range(1, 100000) println(s3.flatMap(powers).reverse.head) + } |