diff options
author | Burak Emir <emir@epfl.ch> | 2007-08-13 14:27:47 +0000 |
---|---|---|
committer | Burak Emir <emir@epfl.ch> | 2007-08-13 14:27:47 +0000 |
commit | 3cebbd7ceafac3a653a74f3b22af37e3683566c7 (patch) | |
tree | 778fb05cede5fccf07b853c330ceedd81d64fd06 /test/files/run | |
parent | 974e1a2f9e6253a45b955708bcee3cb706454afe (diff) | |
download | scala-3cebbd7ceafac3a653a74f3b22af37e3683566c7.tar.gz scala-3cebbd7ceafac3a653a74f3b22af37e3683566c7.tar.bz2 scala-3cebbd7ceafac3a653a74f3b22af37e3683566c7.zip |
Definitions, Par: encoding equality patterns us...
Definitions, Par: encoding equality patterns using <equals> pattern type
code generation: if pattern body is throw, generate throw directly (no
sharing) tests:moved unboxmatch into patmatnew
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/patmatnew.scala | 14 | ||||
-rw-r--r-- | test/files/run/unboxmatch.check | 2 | ||||
-rw-r--r-- | test/files/run/unboxmatch.scala | 10 |
3 files changed, 13 insertions, 13 deletions
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") - } -} |