diff options
Diffstat (limited to 'test/files/run/patmatnew.scala')
-rw-r--r-- | test/files/run/patmatnew.scala | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/test/files/run/patmatnew.scala b/test/files/run/patmatnew.scala index daa1f9898a..46e980dff0 100644 --- a/test/files/run/patmatnew.scala +++ b/test/files/run/patmatnew.scala @@ -13,20 +13,16 @@ trait Shmeez extends AnyRef with Treez { } } -object Test { - import scala.testing.SUnit._ +import scala.testing.SUnit._ - def main(args:Array[String]): Unit = { - val tr = new TestResult - new TestSuite( +object Test extends TestConsoleMain { + + def suite = new TestSuite( new TestSimpleIntSwitch, new Test717, new TestGuards - ).run(tr) + ) - for(val f <- tr.failures()) - Console println f - } class Foo(j:Int) { case class Bar(i:Int) @@ -130,5 +126,21 @@ object Test { case List(1,2,xs @ _*) => case Nil => } + + def j = (List[Int](), List[Int](1)) match { + case (Nil, _) => 'a' + case (_, Nil) => 'b' + case (h1 :: t1, h2 :: t2) => 'c' + } + + def k (x:AnyRef) = x match { + case null => 1 + case _ => 2 + } + + val FooBar = 42 + def lala() = 42 match { + case FooBar => true + } } |