From 3a0b0d40d7be5fb100a1b061aab54a4d4a51ae60 Mon Sep 17 00:00:00 2001 From: michelou Date: Tue, 20 May 2008 14:25:02 +0000 Subject: int -> Int, etc.. --- test/files/run/boolexprs.scala | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'test/files/run/boolexprs.scala') diff --git a/test/files/run/boolexprs.scala b/test/files/run/boolexprs.scala index 7080f84b56..f92a358e26 100644 --- a/test/files/run/boolexprs.scala +++ b/test/files/run/boolexprs.scala @@ -5,13 +5,13 @@ class Counter { private var n: Int = 0; - def incrThen(b: Boolean) = if (b) n = n + 1; + def incrThen(b: Boolean) = if (b) n += 1; def value = n; } object Test1 { var flag = false; - def flip: boolean = { val tmp = flag; flag = !flag; tmp } + def flip: Boolean = { val tmp = flag; flag = !flag; tmp } def run: Int = { val c = new Counter; c.incrThen(flip || flip); @@ -34,7 +34,7 @@ object Test2 { // Test code object Test { - def check_success(name: String, closure: => Int, expected: Int): Unit = { + def check_success(name: String, closure: => Int, expected: Int) { Console.print("test " + name); try { val actual: Int = closure; @@ -44,14 +44,13 @@ object Test { Console.print(" failed: expected "+ expected +", found "+ actual); } } catch { - case exception: Throwable => { + case exception: Throwable => Console.print(" raised exception " + exception); - } } Console.println; } - def main(args: Array[String]): Unit = { + def main(args: Array[String]) { check_success("Test1", Test1.run, 1); check_success("Test2", Test2.run, 0); Console.println; -- cgit v1.2.3