summaryrefslogtreecommitdiff
path: root/test/files/run/iterators.scala
diff options
context:
space:
mode:
authormihaylov <mihaylov@epfl.ch>2005-09-27 08:24:43 +0000
committermihaylov <mihaylov@epfl.ch>2005-09-27 08:24:43 +0000
commitff21a4fbafeb04afbd4dade2a217a4de2ab034f9 (patch)
tree6ed4066269260129cb3085deded9374f8b1f6b9d /test/files/run/iterators.scala
parent5f6f5f723b884cd41d1233340590e2bf95d90588 (diff)
downloadscala-ff21a4fbafeb04afbd4dade2a217a4de2ab034f9.tar.gz
scala-ff21a4fbafeb04afbd4dade2a217a4de2ab034f9.tar.bz2
scala-ff21a4fbafeb04afbd4dade2a217a4de2ab034f9.zip
Made platform independant
Diffstat (limited to 'test/files/run/iterators.scala')
-rw-r--r--test/files/run/iterators.scala14
1 files changed, 6 insertions, 8 deletions
diff --git a/test/files/run/iterators.scala b/test/files/run/iterators.scala
index 41965ba5b1..dde11048d9 100644
--- a/test/files/run/iterators.scala
+++ b/test/files/run/iterators.scala
@@ -5,8 +5,6 @@
//############################################################################
-import java.lang.System; // to avoid name clash with .NET's library
-
object Test {
def check_range: Int = {
@@ -39,20 +37,20 @@ object Test {
}
def check_success[A](name: String, closure: => A, expected: A): Unit = {
- System.out.print("test " + name);
+ Console.print("test " + name);
try {
val actual: A = closure;
if (actual == expected)
- System.out.print(" was successful");
+ Console.print(" was successful");
else
- System.out.print(" failed: expected "+ expected +", found "+ actual);
+ Console.print(" failed: expected "+ expected +", found "+ actual);
}
catch {
case exception: Throwable => {
- System.out.print(" raised exception " + exception);
+ Console.print(" raised exception " + exception);
}
}
- System.out.println();
+ Console.println;
}
def main(args: Array[String]): Unit = {
@@ -60,7 +58,7 @@ object Test {
check_success("check_take", check_take, 10);
check_success("check_drop", check_drop, 12);
check_success("check_foreach", check_foreach, 190);
- System.out.println();
+ Console.println;
}
}