diff options
author | Paul Phillips <paulp@improving.org> | 2009-10-07 17:07:27 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-10-07 17:07:27 +0000 |
commit | 6b31849b85532946cb90b2552cb451b58dbd884d (patch) | |
tree | 6c343195529c27d43710ae14f77ffc079ccc3ebb /test/pending/run/bugs425-and-816.scala | |
parent | 9f121f57e034a7feb07bad7f67403f3ac75b46d4 (diff) | |
download | scala-6b31849b85532946cb90b2552cb451b58dbd884d.tar.gz scala-6b31849b85532946cb90b2552cb451b58dbd884d.tar.bz2 scala-6b31849b85532946cb90b2552cb451b58dbd884d.zip |
Moved a pile of passing tests from pending to f...
Moved a pile of passing tests from pending to files, fixed some untesty
tests, and will now close the associated tickets.
Diffstat (limited to 'test/pending/run/bugs425-and-816.scala')
-rw-r--r-- | test/pending/run/bugs425-and-816.scala | 46 |
1 files changed, 16 insertions, 30 deletions
diff --git a/test/pending/run/bugs425-and-816.scala b/test/pending/run/bugs425-and-816.scala index 4e841ccc31..d9267d06af 100644 --- a/test/pending/run/bugs425-and-816.scala +++ b/test/pending/run/bugs425-and-816.scala @@ -1,41 +1,27 @@ object Test { - object bug816 { - abstract class Atest(val data: String) - case class Btest(override val data: String, val b: Boolean) extends Atest(data) - case class Ctest(override val data: String) extends Btest(data, true) - - class testCaseClass { - def test(x: Atest) = x match { - case Ctest(data) => "C" - case Btest(data, b) => "B" - } - } - def go() = { - val tcc = new testCaseClass() - - tcc.test(Ctest("foo")) + tcc.test(Btest("bar", true)) - } - } - object bug425 { case class A(x: Int) case class B(override val x: Int, y: Double) extends A(x) val b: A = B(5, 3.3) - def flail = b match { - case B(x, y) => "B" - case A(x) => "A" + b match { + case B(x, y) => Console.println(y) + case A(x) => Console.println(x) } - def flail2 = (B(10, 5.5): Any) match { - case A(20) => "1" - case A(10) => "2" - case _ => "fail" - } - def go() = flail + flail2 } - def main(args: Array[String]): Unit = { - assert(bug816.go() == "CB") - assert(bug425.go() == "B2") + object bug816 { + abstract class Atest(val data: String) + + case class Btest(override val data: String, val b: boolean) extends Atest(data) + + case class Ctest(override val data: String) extends Btest(data, true) + + class testCaseClass { + def test(x: Atest) = x match { + case Ctest(data) => Console.println("C") + case Btest(data, b) => Console.println("B") + } + } } } |