diff options
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/iterators.check | 1 | ||||
-rw-r--r-- | test/files/run/iterators.scala | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/test/files/run/iterators.check b/test/files/run/iterators.check index 399324347f..cd1b79144a 100644 --- a/test/files/run/iterators.check +++ b/test/files/run/iterators.check @@ -7,6 +7,7 @@ test check_drop was successful test check_foreach was successful test check_forall was successful test check_fromArray was successful +test check_collect was successful test check_indexOf was successful test check_findIndexOf was successful diff --git a/test/files/run/iterators.scala b/test/files/run/iterators.scala index 9c427521df..db6d3632e9 100644 --- a/test/files/run/iterators.scala +++ b/test/files/run/iterators.scala @@ -84,6 +84,9 @@ object Test { xs0.length + xs1.length + xs2.length + xs3.length + xs4.length } + def check_collect: String = + List(1, 2, 3, 4, 5).elements.collect.mkString("x") + def check_indexOf: String = { val i = List(1, 2, 3, 4, 5).indexOf(4) val j = List(1, 2, 3, 4, 5).indexOf(16) @@ -122,6 +125,7 @@ object Test { check_success("check_foreach", check_foreach, 190) check_success("check_forall", check_forall, 0) check_success("check_fromArray",check_fromArray, 14) + check_success("check_collect", check_collect, "1x2x3x4x5") check_success("check_indexOf", check_indexOf, "3x-1") check_success("check_findIndexOf", check_findIndexOf, "3x-1") println() |