summaryrefslogtreecommitdiff
path: root/test/files/run/exceptions.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/exceptions.scala
parent5f6f5f723b884cd41d1233340590e2bf95d90588 (diff)
downloadscala-ff21a4fbafeb04afbd4dade2a217a4de2ab034f9.tar.gz
scala-ff21a4fbafeb04afbd4dade2a217a4de2ab034f9.tar.bz2
scala-ff21a4fbafeb04afbd4dade2a217a4de2ab034f9.zip
Made platform independant
Diffstat (limited to 'test/files/run/exceptions.scala')
-rw-r--r--test/files/run/exceptions.scala12
1 files changed, 5 insertions, 7 deletions
diff --git a/test/files/run/exceptions.scala b/test/files/run/exceptions.scala
index 1165308464..7743f25ef9 100644
--- a/test/files/run/exceptions.scala
+++ b/test/files/run/exceptions.scala
@@ -5,8 +5,6 @@
//############################################################################
-import java.lang.System; // to avoid name clash with .NET's library
-
abstract class IntMap[A] {
def lookup(key: Int): A = match {
case Empty() => error("KO")
@@ -20,13 +18,13 @@ object exceptions {
def check(what: String, actual: Any, expected: Any): Unit = {
val success: Boolean = actual == expected;
- System.out.print(if (success) "ok" else "KO");
+ Console.print(if (success) "ok" else "KO");
var value: String = if (actual == null) "null" else actual.toString();
if (value == "\u0000") value = "\\u0000";
- System.out.print(": " + what + " = " + value);
- if (!success) System.out.print(" != " + expected);
- System.out.println();
- System.out.flush();
+ Console.print(": " + what + " = " + value);
+ if (!success) Console.print(" != " + expected);
+ Console.println;
+ Console.flush;
}
def test: Unit = {