diff options
Diffstat (limited to 'test/pending/run')
-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/subarray.check | 2 |
4 files changed, 0 insertions, 51 deletions
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/subarray.check b/test/pending/run/subarray.check deleted file mode 100644 index 814f4a4229..0000000000 --- a/test/pending/run/subarray.check +++ /dev/null @@ -1,2 +0,0 @@ -one -two |