diff options
author | Paul Phillips <paulp@improving.org> | 2010-09-28 00:51:25 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-09-28 00:51:25 +0000 |
commit | 9c0e58c48da4cdbae7c96ef45fc15cd7aff4301f (patch) | |
tree | 857d48a844aa0479863f79c2a991984ac6a0104f /test/pending/run | |
parent | a56c33b6a470939a1396015972f09e19dc493245 (diff) | |
download | scala-9c0e58c48da4cdbae7c96ef45fc15cd7aff4301f.tar.gz scala-9c0e58c48da4cdbae7c96ef45fc15cd7aff4301f.tar.bz2 scala-9c0e58c48da4cdbae7c96ef45fc15cd7aff4301f.zip |
Cleaning up the contents of test.
including "CheckEither", written against scalacheck 1.2 in the year 471
AD. Removed all the duplicates I could find, mostly between pending
and files. Renamed a bunch of tests so they wouldn't look like likely
duplicates next time around. Nominated somebody else to do this once in
a while.
No review.
Diffstat (limited to 'test/pending/run')
-rw-r--r-- | test/pending/run/bug1006.scala | 13 | ||||
-rw-r--r-- | test/pending/run/bug2087.scala | 8 | ||||
-rw-r--r-- | test/pending/run/bug2365/Test.scala | 35 | ||||
-rw-r--r-- | test/pending/run/bug2365/bug2365.javaopts | 1 | ||||
-rwxr-xr-x | test/pending/run/bug2365/run | 13 | ||||
-rw-r--r-- | test/pending/run/bug3150.scala | 10 | ||||
-rw-r--r-- | test/pending/run/castsingleton.scala | 10 | ||||
-rw-r--r-- | test/pending/run/t0807.scala | 5 | ||||
-rw-r--r-- | test/pending/run/t1939.scala | 41 |
9 files changed, 0 insertions, 136 deletions
diff --git a/test/pending/run/bug1006.scala b/test/pending/run/bug1006.scala deleted file mode 100644 index 0a82373fb6..0000000000 --- a/test/pending/run/bug1006.scala +++ /dev/null @@ -1,13 +0,0 @@ -object foo { - def main(args: Array[String]) { - abstract class A[T] { - def myVal: T - } - - class B[T](value: T) extends A[T] { - def myVal = value - } - - Console.println(new B[int](23).myVal) - } -} diff --git a/test/pending/run/bug2087.scala b/test/pending/run/bug2087.scala deleted file mode 100644 index b3f96fa415..0000000000 --- a/test/pending/run/bug2087.scala +++ /dev/null @@ -1,8 +0,0 @@ -object Test { - def main(args: Array[String]): Unit = { - val s: Short = 0xFA99.toShort - val c: Char = 0xFA99.toChar - - assert((s == c) == (c == s)) - } -}
\ No newline at end of file diff --git a/test/pending/run/bug2365/Test.scala b/test/pending/run/bug2365/Test.scala deleted file mode 100644 index 92b58f4a25..0000000000 --- a/test/pending/run/bug2365/Test.scala +++ /dev/null @@ -1,35 +0,0 @@ -import scala.tools.nsc.io._ -import java.net.URL - -object A { def apply(d: { def apply(): Int}) = d.apply() } -object A2 { def apply(d: { def apply(): Int}) = d.apply() } -object A3 { def apply(d: { def apply(): Int}) = d.apply() } -object A4 { def apply(d: { def apply(): Int}) = d.apply() } - -class B extends Function0[Int] { - def apply() = 3 -} - -object Test -{ - type StructF0 = { def apply(): Int } - def main(args: Array[String]) { - for(i <- 0 until 150) - println(i + " " + test(A.apply) + " " + test(A2.apply) + " " + test(A3.apply) + " " + test(A3.apply)) - } - - def test(withF0: StructF0 => Int): Int = { - // Some large jar - val ivyJar = File("/local/lib/java/ivy.jar").toURL - // load a class in a separate loader that will be passed to A - val loader = new java.net.URLClassLoader(Array(File(".").toURL, ivyJar)) - // load a real class to fill perm gen space - Class.forName("org.apache.ivy.Ivy", true, loader).newInstance - // create a class from another class loader with an apply: Int method - val b = Class.forName("B", true, loader).newInstance - - // pass instance to a, which will call apply using structural type reflection. - // This should hold on to the class for B, which means bLoader will not get collected - withF0(b.asInstanceOf[StructF0]) - } -} diff --git a/test/pending/run/bug2365/bug2365.javaopts b/test/pending/run/bug2365/bug2365.javaopts deleted file mode 100644 index 357e033c1c..0000000000 --- a/test/pending/run/bug2365/bug2365.javaopts +++ /dev/null @@ -1 +0,0 @@ --XX:MaxPermSize=25M diff --git a/test/pending/run/bug2365/run b/test/pending/run/bug2365/run deleted file mode 100755 index f3c44ad086..0000000000 --- a/test/pending/run/bug2365/run +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# -# This script should fail with any build of scala where #2365 -# is not fixed, and otherwise succeed. Failure means running out -# of PermGen space. - -CP=.:/local/lib/java/ivy.jar -# SCALAC=/scala/inst/28/bin/scalac -SCALAC=scalac -RUN_OPTS="-XX:MaxPermSize=25M -verbose:gc" - -$SCALAC -cp $CP *.scala -JAVA_OPTS="${RUN_OPTS}" scala -cp $CP Test diff --git a/test/pending/run/bug3150.scala b/test/pending/run/bug3150.scala deleted file mode 100644 index 034703b5f7..0000000000 --- a/test/pending/run/bug3150.scala +++ /dev/null @@ -1,10 +0,0 @@ -object Test { - case object Bob { override def equals(other: Any) = true } - def f(x: Any) = x match { case Bob => Bob } - - def main(args: Array[String]): Unit = { - assert(f(Bob) eq Bob) - assert(f(0) eq Bob) - assert(f(Nil) eq Bob) - } -} diff --git a/test/pending/run/castsingleton.scala b/test/pending/run/castsingleton.scala deleted file mode 100644 index 171b380dc9..0000000000 --- a/test/pending/run/castsingleton.scala +++ /dev/null @@ -1,10 +0,0 @@ -object Test extends Application { - case class L(); - object N extends L(); - - def empty(xs : L) : Unit = xs match { - case x@N => println(x); println(x); - } - - empty(L()) -} diff --git a/test/pending/run/t0807.scala b/test/pending/run/t0807.scala deleted file mode 100644 index e69aa1c71c..0000000000 --- a/test/pending/run/t0807.scala +++ /dev/null @@ -1,5 +0,0 @@ -trait A -trait B extends A { val x = println("early") } -object Test extends Application { - new B {} -} diff --git a/test/pending/run/t1939.scala b/test/pending/run/t1939.scala deleted file mode 100644 index 44ab1769d2..0000000000 --- a/test/pending/run/t1939.scala +++ /dev/null @@ -1,41 +0,0 @@ -// works in trunk -class Module {} - -abstract class T { - type moduleType <: Module - def module: moduleType -} - -final class T1(val module: Module) extends T { - type moduleType = Module -} - -final class T2(_module: Module) extends T { - type moduleType = Module - - def module = _module -} - -object Main extends Application { - - type mType = Module - - type tType = T { type moduleType <: mType } - // type tType = T { type moduleType <: Module } // runs successfully - // type tType = T // runs successfully - - def f(ts: List[tType]): Unit = { - - for (t <- ts; m = t.module) {} - ts.map(_.module).foreach { _ => () } - // ts.map(t => (t : T).module).foreach { _ => () } // runs successfully - } - - f(new T1(new Module) :: new T2(new Module) :: Nil) -} - -/* - * java.lang.AbstractMethodError - at scala.List.foreach(List.scala:849) - at Main$.f -*/ |