diff options
author | Burak Emir <emir@epfl.ch> | 2007-02-06 00:17:23 +0000 |
---|---|---|
committer | Burak Emir <emir@epfl.ch> | 2007-02-06 00:17:23 +0000 |
commit | 89e9d67df8a1cfa075808da59238b20f406f7f51 (patch) | |
tree | 744adc9131d4be6e6b9e14478b2747df464dd462 /test/files | |
parent | b277d15d25f322818921e3006e80e3f34aa8014a (diff) | |
download | scala-89e9d67df8a1cfa075808da59238b20f406f7f51.tar.gz scala-89e9d67df8a1cfa075808da59238b20f406f7f51.tar.bz2 scala-89e9d67df8a1cfa075808da59238b20f406f7f51.zip |
clean up
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/patmatnew.scala | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/test/files/run/patmatnew.scala b/test/files/run/patmatnew.scala index 749b0bc21d..9dc73a86de 100644 --- a/test/files/run/patmatnew.scala +++ b/test/files/run/patmatnew.scala @@ -14,13 +14,12 @@ trait Shmeez extends AnyRef with Treez { } object Test { -/* import scala.testing.SUnit._ def main(args:Array[String]): Unit = { val tr = new TestResult new TestSuite( - + new TestSimpleIntSwitch, new Test717, new TestGuards ).run(tr) @@ -32,6 +31,20 @@ object Test { class Foo(j:Int) { case class Bar(i:Int) } + class TestSimpleIntSwitch extends TestCase("SimpleIntSwitch") { + override def runTest() = { + assertEquals("s1", 1, 1 match { + case 3 => 3 + case 2 => 2 + case 1 => 1 + case 0 => 0 + }) + assertEquals("s2", 1, 1 match { + case 1 => 1 + case _ => 0 + }) + } + } class Test717 extends TestCase("#717 test path of case classes") { val foo1 = new Foo(1) val foo2 = new Foo(2) @@ -111,7 +124,7 @@ object Test { case {_:Some[_],_:Some[_]} => 3 case _ => 4 } -*/ + def i = List(1,2) match { case List(1) => case List(1,2,xs @ _*) => |