From 4725aaf6ebc0388a3202060643915e60e71c1640 Mon Sep 17 00:00:00 2001 From: prokopec Date: Mon, 17 Jan 2011 15:18:08 +0000 Subject: [PATCH] Added specialized test to ant build, and ported old specialized 'run' tests to check the number of boxings. No review. git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23999 5e8d7ff9-d8ef-0310-90f0-a4852d11357a --- build.xml | 4 +++- src/partest/scala/tools/partest/PartestTask.scala | 9 ++++++++- src/partest/scala/tools/partest/nest/ConsoleRunner.scala | 3 ++- test/files/specialized/spec-matrix.check | 2 +- test/files/specialized/spec-matrix.scala | 2 +- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/build.xml b/build.xml index 941c6aa7f..489d07617 100644 --- a/build.xml +++ b/build.xml @@ -1569,7 +1569,9 @@ BOOTRAPING TEST AND TEST SUITE - + + + diff --git a/src/partest/scala/tools/partest/PartestTask.scala b/src/partest/scala/tools/partest/PartestTask.scala index b21c80763..2e8bd8358 100644 --- a/src/partest/scala/tools/partest/PartestTask.scala +++ b/src/partest/scala/tools/partest/PartestTask.scala @@ -68,6 +68,10 @@ class PartestTask extends Task with CompilationPathProperty { scalapFiles = Some(input) } + def addConfiguredSpecializedTests(input: FileSet) { + specializedFiles = Some(input) + } + def setSrcDir(input: String) { srcDir = Some(input) } @@ -141,6 +145,7 @@ class PartestTask extends Task with CompilationPathProperty { private var scriptFiles: Option[FileSet] = None private var shootoutFiles: Option[FileSet] = None private var scalapFiles: Option[FileSet] = None + private var specializedFiles: Option[FileSet] = None private var errorOnFailed: Boolean = false private var scalacOpts: Option[String] = None private var timeout: Option[String] = None @@ -183,6 +188,7 @@ class PartestTask extends Task with CompilationPathProperty { private def getScriptFiles = getFiles(scriptFiles) private def getShootoutFiles = getFiles(shootoutFiles) private def getScalapFiles = getFiles(scalapFiles) + private def getSpecializedFiles = getFiles(specializedFiles) override def execute() { if (isPartestDebug || debug) { @@ -229,7 +235,8 @@ class PartestTask extends Task with CompilationPathProperty { (getScalacheckFiles, "scalacheck", "Running scalacheck tests"), (getScriptFiles, "script", "Running script files"), (getShootoutFiles, "shootout", "Running shootout tests"), - (getScalapFiles, "scalap", "Running scalap tests") + (getScalapFiles, "scalap", "Running scalap tests"), + (getSpecializedFiles, "specialized", "Running specialized files") ) def runSet(set: TFSet): (Int, Int, Iterable[String]) = { diff --git a/src/partest/scala/tools/partest/nest/ConsoleRunner.scala b/src/partest/scala/tools/partest/nest/ConsoleRunner.scala index 4e174f602..a7bd6d9d9 100644 --- a/src/partest/scala/tools/partest/nest/ConsoleRunner.scala +++ b/src/partest/scala/tools/partest/nest/ConsoleRunner.scala @@ -35,7 +35,8 @@ class ConsoleRunner extends DirectRunner { TestSet("shootout", pathFilter, "Testing shootout tests"), TestSet("script", pathFilter, "Testing script tests"), TestSet("scalacheck", x => pathFilter(x) || x.isDirectory, "Testing ScalaCheck tests"), - TestSet("scalap", _.isDirectory, "Run scalap decompiler tests") + TestSet("scalap", _.isDirectory, "Run scalap decompiler tests"), + TestSet("specialized", pathFilter, "Testing specialized tests") ) } diff --git a/test/files/specialized/spec-matrix.check b/test/files/specialized/spec-matrix.check index 77b8d536f..c861e7962 100644 --- a/test/files/specialized/spec-matrix.check +++ b/test/files/specialized/spec-matrix.check @@ -1,2 +1,2 @@ * -4080500 \ No newline at end of file +4081500 \ No newline at end of file diff --git a/test/files/specialized/spec-matrix.scala b/test/files/specialized/spec-matrix.scala index 7e04bb8cd..dfa8abb60 100644 --- a/test/files/specialized/spec-matrix.scala +++ b/test/files/specialized/spec-matrix.scala @@ -29,7 +29,7 @@ object Test { def main(args: Array[String]) { val m = randomMatrix(200, 100) val n = randomMatrix(100, 200) - + mult(m, n) println("*")