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 | |
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')
-rw-r--r-- | test/pending/jvm/t1801.check | 6 | ||||
-rw-r--r-- | test/pending/jvm/t1801.scala | 31 | ||||
-rw-r--r-- | test/pending/pos/bug2005.scala | 10 | ||||
-rw-r--r-- | test/pending/pos/bug2023.scala | 16 | ||||
-rw-r--r-- | test/pending/pos/bug2261.scala | 6 | ||||
-rw-r--r-- | test/pending/pos/switchUnbox.flags | 1 | ||||
-rw-r--r-- | test/pending/pos/switchUnbox.scala | 11 | ||||
-rw-r--r-- | test/pending/pos/t1000.scala | 3 | ||||
-rw-r--r-- | test/pending/pos/t1722.scala | 10 | ||||
-rwxr-xr-x | test/pending/pos/t1722/C.scala | 9 | ||||
-rwxr-xr-x | test/pending/pos/t1722/Test.scala | 4 | ||||
-rwxr-xr-x | test/pending/pos/t1722/Top.scala | 13 | ||||
-rw-r--r-- | test/pending/pos/t1798.scala | 10 | ||||
-rw-r--r-- | test/pending/pos/t1987.scala | 8 | ||||
-rw-r--r-- | test/pending/pos/t2201.scala | 8 | ||||
-rw-r--r-- | test/pending/run/bugs425-and-816.scala | 46 | ||||
-rw-r--r-- | test/pending/run/t2005.scala | 24 |
17 files changed, 16 insertions, 200 deletions
diff --git a/test/pending/jvm/t1801.check b/test/pending/jvm/t1801.check deleted file mode 100644 index bf78a99db9..0000000000 --- a/test/pending/jvm/t1801.check +++ /dev/null @@ -1,6 +0,0 @@ -0 -100 -200 -300 -400 -done! diff --git a/test/pending/jvm/t1801.scala b/test/pending/jvm/t1801.scala deleted file mode 100644 index 6ed7c56336..0000000000 --- a/test/pending/jvm/t1801.scala +++ /dev/null @@ -1,31 +0,0 @@ -import scala.actors.Actor._ - -object Test { - val rt = Runtime.getRuntime() - val sender = actor { - var cnt = 0 - while(cnt < 500) { - if ((cnt % 100) == 0) println(cnt) - receiver ! new Array[Int] (148576) - cnt += 1 - //println ("Used Mem: " + (((rt.totalMemory() - rt.freeMemory()) / 1048576.) formatted "%.2f") + " Mb") - } - receiver ! 'exit - } - - val receiver = actor { - loop { - react { - case x: Array[Int] => ()//println ("received " + x.length) - case 'exit => { - println("done!") - exit() - } - } - } - } - - def main (args: Array[String]) { - sender - } -} diff --git a/test/pending/pos/bug2005.scala b/test/pending/pos/bug2005.scala deleted file mode 100644 index 2514a5f711..0000000000 --- a/test/pending/pos/bug2005.scala +++ /dev/null @@ -1,10 +0,0 @@ -object Bug { - def main(args: Array[String]) { - val a = new Array[Array[Int]](2,2) - test(a) - } - def test[A](t: Array[Array[A]]) { - val tmp = t(0) - t(1) = tmp - } -} diff --git a/test/pending/pos/bug2023.scala b/test/pending/pos/bug2023.scala deleted file mode 100644 index 21c6fc96a6..0000000000 --- a/test/pending/pos/bug2023.scala +++ /dev/null @@ -1,16 +0,0 @@ -trait C[A] - -object C { - implicit def ipl[A](implicit from: A => Ordered[A]): C[A] = null -} - -object P { - def foo[A](i: A, j: A)(implicit c: C[A]): Unit = () -} - -class ImplicitChainTest { - def testTrivial: Unit = { - P.foo('0', '9') - P.foo('0', '9') - } -} diff --git a/test/pending/pos/bug2261.scala b/test/pending/pos/bug2261.scala deleted file mode 100644 index a499af838a..0000000000 --- a/test/pending/pos/bug2261.scala +++ /dev/null @@ -1,6 +0,0 @@ -object Test extends Application { - class Bob[T] - implicit def foo2bar[T](xs: List[T]): Bob[T] = new Bob[T] - var x: Bob[Int] = null - x = List(1,2,3) -} diff --git a/test/pending/pos/switchUnbox.flags b/test/pending/pos/switchUnbox.flags deleted file mode 100644 index ec1ad20e3a..0000000000 --- a/test/pending/pos/switchUnbox.flags +++ /dev/null @@ -1 +0,0 @@ --Xsqueeze:on diff --git a/test/pending/pos/switchUnbox.scala b/test/pending/pos/switchUnbox.scala deleted file mode 100644 index a97bff5521..0000000000 --- a/test/pending/pos/switchUnbox.scala +++ /dev/null @@ -1,11 +0,0 @@ -// this test has accompanying .flags file -// that contains -Xsqueeze:on -// -object Foo { - var xyz: (int, String) = (1, "abc") - xyz._1 match { - case 1 => Console.println("OK") - case 2 => Console.println("OK") - case _ => Console.println("KO") - } -} diff --git a/test/pending/pos/t1000.scala b/test/pending/pos/t1000.scala deleted file mode 100644 index 38f71863d8..0000000000 --- a/test/pending/pos/t1000.scala +++ /dev/null @@ -1,3 +0,0 @@ -object A { - println("""This a "raw" string ending with a "double quote"""") -} diff --git a/test/pending/pos/t1722.scala b/test/pending/pos/t1722.scala deleted file mode 100644 index d059bf22f8..0000000000 --- a/test/pending/pos/t1722.scala +++ /dev/null @@ -1,10 +0,0 @@ -sealed trait Top -trait C { - private object P extends Top -} -/* -$ scala -e 'new AnyRef with C' -error: error while loading Top, class file '/private/tmp/bobobo/./Top.class' is broken -(error reading Scala signature of /private/tmp/bobobo/./Top.class: malformed Scala signature of Top at 185; reference value P of trait C refers to nonexisting symbol.) -one error found -*/ diff --git a/test/pending/pos/t1722/C.scala b/test/pending/pos/t1722/C.scala deleted file mode 100755 index 2695296292..0000000000 --- a/test/pending/pos/t1722/C.scala +++ /dev/null @@ -1,9 +0,0 @@ -trait C { - private object P extends Top -} -/* -$ scala -e 'new AnyRef with C' -error: error while loading Top, class file '/private/tmp/bobobo/./Top.class' is broken -(error reading Scala signature of /private/tmp/bobobo/./Top.class: malformed Scala signature of Top at 185; reference value P of trait C refers to nonexisting symbol.) -one error found -*/ diff --git a/test/pending/pos/t1722/Test.scala b/test/pending/pos/t1722/Test.scala deleted file mode 100755 index 4cba7ab01b..0000000000 --- a/test/pending/pos/t1722/Test.scala +++ /dev/null @@ -1,4 +0,0 @@ -package t1722 -object Test { - val x = new AnyRef with C -} diff --git a/test/pending/pos/t1722/Top.scala b/test/pending/pos/t1722/Top.scala deleted file mode 100755 index 4ac52412aa..0000000000 --- a/test/pending/pos/t1722/Top.scala +++ /dev/null @@ -1,13 +0,0 @@ -package t1722 - -sealed trait Top -trait C { - private object P extends Top -} -/* -$ scala -e 'new AnyRef with C' -error: error while loading Top, class file '/private/tmp/bobobo/./Top.class' is broken -(error reading Scala signature of /private/tmp/bobobo/./Top.class: malformed Scala signature of Top at 185; reference value P of trait C refers to nonexisting symbol.) -one error found -Martin: I think this has to do with children property. -*/ diff --git a/test/pending/pos/t1798.scala b/test/pending/pos/t1798.scala deleted file mode 100644 index 1624e3025e..0000000000 --- a/test/pending/pos/t1798.scala +++ /dev/null @@ -1,10 +0,0 @@ -object Foo { private def bar(): Int = 55 } -class Foo(x: Int) { def this() = this(Foo.bar()) } - -/* - * scalac28 a.scala -a.scala:2: error: method bar cannot be accessed in object Foo -class Foo(x: Int) { def this() = this(Foo.bar()) } - ^ -one error found -*/ diff --git a/test/pending/pos/t1987.scala b/test/pending/pos/t1987.scala deleted file mode 100644 index ccab133716..0000000000 --- a/test/pending/pos/t1987.scala +++ /dev/null @@ -1,8 +0,0 @@ -package object overloading { - def bar(f: (Int) => Unit): Unit = () - def bar(f: (Int, Int) => Unit): Unit = () -} - -class PackageObjectOverloadingTest { - overloading.bar( (i: Int) => () ) // doesn't compile. -} diff --git a/test/pending/pos/t2201.scala b/test/pending/pos/t2201.scala deleted file mode 100644 index 21af170cf1..0000000000 --- a/test/pending/pos/t2201.scala +++ /dev/null @@ -1,8 +0,0 @@ -class Test -object Test { implicit def view(x : Test) = 0 } - -object Call { - def call(implicit view : Test => Int) = view(null) - call - call -} 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") + } + } } } diff --git a/test/pending/run/t2005.scala b/test/pending/run/t2005.scala deleted file mode 100644 index 8e4243a768..0000000000 --- a/test/pending/run/t2005.scala +++ /dev/null @@ -1,24 +0,0 @@ -Object Bug { - def main(args: Array[String]) { - val a = new Array[Array[Int]](2,2) - test(a) - } - def test[A](t: Array[Array[A]]) { - val tmp = t(0) - t(1) = tmp - } -} -java.lang.ArrayStoreException: scala.runtime.BoxedIntArray - at scala.runtime.BoxedObjectArray.update(BoxedObjectArray.scala:26) - at Bug$.test(Bug.scala:12) - at Bug$.main(Bug.scala:7) - at Bug.main(Bug.scala) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) - at java.lang.reflect.Method.invoke(Method.java:585) - at scala.tools.nsc.ObjectRunner$$anonfun$run$1.apply(ObjectRunner.scala:75) - at scala.tools.nsc.ObjectRunner$.withContextClassLoader(ObjectRunner.scala:49) - at scala.tools.nsc.ObjectRunner$.run(ObjectRunner.scala:74) - at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:154) - at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala) |