From 3cebbd7ceafac3a653a74f3b22af37e3683566c7 Mon Sep 17 00:00:00 2001 From: Burak Emir Date: Mon, 13 Aug 2007 14:27:47 +0000 Subject: Definitions, Par: encoding equality patterns us... Definitions, Par: encoding equality patterns using pattern type code generation: if pattern body is throw, generate throw directly (no sharing) tests:moved unboxmatch into patmatnew --- test/files/run/patmatnew.scala | 14 +++++++++++++- test/files/run/unboxmatch.check | 2 -- test/files/run/unboxmatch.scala | 10 ---------- 3 files changed, 13 insertions(+), 13 deletions(-) delete mode 100644 test/files/run/unboxmatch.check delete mode 100644 test/files/run/unboxmatch.scala (limited to 'test/files/run') diff --git a/test/files/run/patmatnew.scala b/test/files/run/patmatnew.scala index d9e36a35fe..a54bac814f 100644 --- a/test/files/run/patmatnew.scala +++ b/test/files/run/patmatnew.scala @@ -31,7 +31,8 @@ object Test extends TestConsoleMain { new TestStream, new Test903, new Test1093, - new Test1163_Order + new Test1163_Order, + new TestUnbox ) class Foo(j:Int) { @@ -133,6 +134,17 @@ object Test extends TestConsoleMain { def runTest() = assertEquals("both", (Var("x"),Var("y")), f) } + class TestUnbox extends TestCase("unbox") { + override def runTest() { + val xyz: (int, String, boolean) = (1, "abc", true) + xyz._1 match { + case 1 => "OK" + case 2 => assert(false); "KO" + case 3 => assert(false); "KO" + } + } + } + class Test806_818 { // #806, #811 compile only -- type of bind // bug811 trait Core { diff --git a/test/files/run/unboxmatch.check b/test/files/run/unboxmatch.check deleted file mode 100644 index e14f671011..0000000000 --- a/test/files/run/unboxmatch.check +++ /dev/null @@ -1,2 +0,0 @@ -(1,abc,true) -OK diff --git a/test/files/run/unboxmatch.scala b/test/files/run/unboxmatch.scala deleted file mode 100644 index e354798ebd..0000000000 --- a/test/files/run/unboxmatch.scala +++ /dev/null @@ -1,10 +0,0 @@ -object Test extends Application { - var xyz: (int, String, boolean) = _ - xyz = (1, "abc", true) - Console.println(xyz) - xyz._1 match { - case 1 => Console.println("OK") - case 2 => Console.println("KO") - case 3 => Console.println("KO") - } -} -- cgit v1.2.3