summaryrefslogtreecommitdiff
path: root/src/partest
diff options
context:
space:
mode:
authorPhilipp Haller <hallerp@gmail.com>2008-05-28 13:23:54 +0000
committerPhilipp Haller <hallerp@gmail.com>2008-05-28 13:23:54 +0000
commitb7e13c2338825ea3d7840c403eb93a8960058942 (patch)
treee2574bf63e8db66c336e755194699a79caf12ed9 /src/partest
parentda328a26bbfb34ed57dc45c714acd969c1a260c5 (diff)
downloadscala-b7e13c2338825ea3d7840c403eb93a8960058942.tar.gz
scala-b7e13c2338825ea3d7840c403eb93a8960058942.tar.bz2
scala-b7e13c2338825ea3d7840c403eb93a8960058942.zip
Removed vararg warnings in partest
Diffstat (limited to 'src/partest')
-rw-r--r--src/partest/scala/tools/partest/PartestTask.scala14
-rw-r--r--src/partest/scala/tools/partest/nest/CompileManager.scala8
-rw-r--r--src/partest/scala/tools/partest/nest/ConsoleFileManager.scala1
-rw-r--r--src/partest/scala/tools/partest/nest/ReflectiveRunner.scala4
4 files changed, 14 insertions, 13 deletions
diff --git a/src/partest/scala/tools/partest/PartestTask.scala b/src/partest/scala/tools/partest/PartestTask.scala
index 92e9d8e185..67c1ab8f98 100644
--- a/src/partest/scala/tools/partest/PartestTask.scala
+++ b/src/partest/scala/tools/partest/PartestTask.scala
@@ -128,26 +128,26 @@ class PartestTask extends Task {
val antRunner: AnyRef =
classloader.loadClass("scala.tools.partest.nest.AntRunner").newInstance().asInstanceOf[AnyRef]
val antFileManager: AnyRef =
- antRunner.getClass.getMethod("fileManager", Array[Class[_]]()).invoke(antRunner, Array[Object]())
+ antRunner.getClass.getMethod("fileManager", Array[Class[_]](): _*).invoke(antRunner, Array[Object](): _*)
val runMethod =
- antRunner.getClass.getMethod("reflectiveRunTestsForFiles", Array(classOf[Array[File]], classOf[String]))
+ antRunner.getClass.getMethod("reflectiveRunTestsForFiles", Array(classOf[Array[File]], classOf[String]): _*)
def runTestsForFiles(kindFiles: Array[File], kind: String): (Int, Int) = {
- val result = runMethod.invoke(antRunner, Array(kindFiles, kind)).asInstanceOf[Int]
+ val result = runMethod.invoke(antRunner, Array(kindFiles, kind): _*).asInstanceOf[Int]
(result >> 16, result & 0x00FF)
}
def setFileManagerBooleanProperty(name: String, value: Boolean) = {
val setMethod =
- antFileManager.getClass.getMethod(name+"_$eq", Array(classOf[Boolean]))
- setMethod.invoke(antFileManager, Array(java.lang.Boolean.valueOf(value)))
+ antFileManager.getClass.getMethod(name+"_$eq", Array(classOf[Boolean]): _*)
+ setMethod.invoke(antFileManager, Array(java.lang.Boolean.valueOf(value)): _*)
}
def setFileManagerStringProperty(name: String, value: String) = {
val setMethod =
- antFileManager.getClass.getMethod(name+"_$eq", Array(classOf[String]))
- setMethod.invoke(antFileManager, Array(value))
+ antFileManager.getClass.getMethod(name+"_$eq", Array(classOf[String]): _*)
+ setMethod.invoke(antFileManager, Array(value): _*)
}
setFileManagerBooleanProperty("showDiff", showDiff)
diff --git a/src/partest/scala/tools/partest/nest/CompileManager.scala b/src/partest/scala/tools/partest/nest/CompileManager.scala
index 50999dd651..647b8144e8 100644
--- a/src/partest/scala/tools/partest/nest/CompileManager.scala
+++ b/src/partest/scala/tools/partest/nest/CompileManager.scala
@@ -130,9 +130,9 @@ class ReflectiveCompiler(val fileManager: ConsoleFileManager) extends SimpleComp
val fileClass = Class.forName("java.io.File")
val stringClass = Class.forName("java.lang.String")
val sepCompileMethod =
- sepCompilerClass.getMethod("compile", Array(fileClass, stringClass))
+ sepCompilerClass.getMethod("compile", Array(fileClass, stringClass): _*)
val sepCompileMethod2 =
- sepCompilerClass.getMethod("compile", Array(fileClass, stringClass, fileClass))
+ sepCompilerClass.getMethod("compile", Array(fileClass, stringClass, fileClass): _*)
/* This method throws java.lang.reflect.InvocationTargetException
* if the compiler crashes.
@@ -141,7 +141,7 @@ class ReflectiveCompiler(val fileManager: ConsoleFileManager) extends SimpleComp
*/
def compile(file: File, kind: String): Boolean = {
val fileArgs: Array[AnyRef] = Array(file, kind)
- val res = sepCompileMethod.invoke(sepCompiler, fileArgs).asInstanceOf[java.lang.Boolean]
+ val res = sepCompileMethod.invoke(sepCompiler, fileArgs: _*).asInstanceOf[java.lang.Boolean]
res.booleanValue()
}
@@ -152,7 +152,7 @@ class ReflectiveCompiler(val fileManager: ConsoleFileManager) extends SimpleComp
*/
def compile(file: File, kind: String, log: File): Boolean = {
val fileArgs: Array[AnyRef] = Array(file, kind, log)
- val res = sepCompileMethod2.invoke(sepCompiler, fileArgs).asInstanceOf[java.lang.Boolean]
+ val res = sepCompileMethod2.invoke(sepCompiler, fileArgs: _*).asInstanceOf[java.lang.Boolean]
res.booleanValue()
}
}
diff --git a/src/partest/scala/tools/partest/nest/ConsoleFileManager.scala b/src/partest/scala/tools/partest/nest/ConsoleFileManager.scala
index 4ac3e365f5..ba8bc97915 100644
--- a/src/partest/scala/tools/partest/nest/ConsoleFileManager.scala
+++ b/src/partest/scala/tools/partest/nest/ConsoleFileManager.scala
@@ -85,6 +85,7 @@ else
def accept(dir: File, name: String) = name endsWith ".jar"
}) map {file => file.getCanonicalFile.getAbsolutePath}).mkString(""+File.pathSeparator)
}
+ println(CLASSPATH)
def findLatest() {
val testParent = testRootFile.getParentFile
diff --git a/src/partest/scala/tools/partest/nest/ReflectiveRunner.scala b/src/partest/scala/tools/partest/nest/ReflectiveRunner.scala
index 2870d79418..982449471e 100644
--- a/src/partest/scala/tools/partest/nest/ReflectiveRunner.scala
+++ b/src/partest/scala/tools/partest/nest/ReflectiveRunner.scala
@@ -49,9 +49,9 @@ class ReflectiveRunner {
val stringClass = Class.forName("java.lang.String")
val sepMainMethod =
- sepRunnerClass.getMethod("main", Array(stringClass))
+ sepRunnerClass.getMethod("main", Array(stringClass): _*)
val cargs: Array[AnyRef] = Array(args)
- sepMainMethod.invoke(sepRunner, cargs)
+ sepMainMethod.invoke(sepRunner, cargs: _*)
}
}