diff options
Diffstat (limited to 'test/files/run/exceptions.scala')
-rw-r--r-- | test/files/run/exceptions.scala | 12 |
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 = { |