diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-09-17 18:56:09 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-09-17 18:58:28 +0200 |
commit | 22270c68a12587d0125bd4f14c9d9f4cdcdb24d5 (patch) | |
tree | b9ebc3ffa87c93505a7d92dbe2e1cb963c99ed8a /test/files/run/reflection-java-crtp.scala | |
parent | 1b8330c51055b0e83b8187ac3783eabb08d8c778 (diff) | |
download | scala-22270c68a12587d0125bd4f14c9d9f4cdcdb24d5.tar.gz scala-22270c68a12587d0125bd4f14c9d9f4cdcdb24d5.tar.bz2 scala-22270c68a12587d0125bd4f14c9d9f4cdcdb24d5.zip |
refactors java reflection tests
All javac-produced artifacts are now placed into test/files/lib
Diffstat (limited to 'test/files/run/reflection-java-crtp.scala')
-rw-r--r-- | test/files/run/reflection-java-crtp.scala | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/test/files/run/reflection-java-crtp.scala b/test/files/run/reflection-java-crtp.scala index 1b08b3c6bb..260d3540dc 100644 --- a/test/files/run/reflection-java-crtp.scala +++ b/test/files/run/reflection-java-crtp.scala @@ -1,21 +1,8 @@ -import scala.tools.partest._ -import scala.tools.nsc.Settings - -object Test extends ReplTest { - def code = """ - import scala.reflect.runtime.universe._ - val enum = typeOf[SimpleEnumeration].baseClasses(1).asClass - // make sure that the E's in Enum<E extends Enum<E>> are represented by the same symbol - val e1 = enum.typeParams(0).asType - val TypeBounds(_, TypeRef(_, _, List(TypeRef(_, e2: TypeSymbol, _)))) = e1.typeSignature - println(e1 eq e2) - """ - - override def transformSettings(settings: Settings): Settings = { - val thisFile = testPath.jfile.getAbsolutePath - val javaCompiledAnnotationsJar = (thisFile stripSuffix "scala") + "jar" - val classpath = List(sys.props("partest.lib"), sys.props("partest.reflect"), sys.props("partest.comp"), javaCompiledAnnotationsJar) mkString sys.props("path.separator") - settings.processArguments(List("-cp", classpath), true) - settings - } +object Test extends App { + import scala.reflect.runtime.universe._ + val enum = typeOf[JavaSimpleEnumeration].baseClasses(1).asClass + // make sure that the E's in Enum<E extends Enum<E>> are represented by the same symbol + val e1 = enum.typeParams(0).asType + val TypeBounds(_, TypeRef(_, _, List(TypeRef(_, e2: TypeSymbol, _)))) = e1.typeSignature + println(e1, e2, e1 eq e2) }
\ No newline at end of file |