diff --git a/README.md b/README.md index 4314a56..82de207 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ definedTests in Test += ( and files (including java sources) in that directory are compiled in order by looking at `_$N` suffixes before the file's extension and compiling them grouped by $N, in ascending order. - jars in `test/files/lib` are expected to be on the classpath and may be used by tests - - certain kinds of tests (scalacheck/instrumented/specialized) add additional jars to the classpath + - certain kinds of tests (instrumented/specialized) add additional jars to the classpath ## System properties available to tests: diff --git a/build.sbt b/build.sbt index 329704d..2be05fb 100644 --- a/build.sbt +++ b/build.sbt @@ -22,8 +22,6 @@ scalaXmlVersion := { if (scalaVersion.value.startsWith("2.11.")) "1.0.4" else "1.0.6" } -scalaCheckVersion := "1.11.6" - // TODO: eliminate "-deprecation:false" for nightlies, // included by default because we don't want to break scala/scala pr validation scalacOptions ++= @@ -43,9 +41,6 @@ libraryDependencies += "com.googlecode.java-diff-utils" % "diffutils" % "1. libraryDependencies += "org.scala-sbt" % "test-interface" % "1.0" -// to run scalacheck tests, depend on scalacheck separately -libraryDependencies += "org.scalacheck" %% "scalacheck" % scalaCheckVersion.value % "provided" - // mark all scala dependencies as provided which means one has to explicitly provide them when depending on partest // this allows for easy testing of modules (like scala-xml) that provide tested classes themselves and shouldn't // pull in an older version of itself diff --git a/project/keys.scala b/project/keys.scala index 82c8f68..9c3de57 100644 --- a/project/keys.scala +++ b/project/keys.scala @@ -3,5 +3,4 @@ object VersionKeys { // To facilitate scripted build of all modules (while we're working on getting dbuild up and running) val scalaXmlVersion = settingKey[String]("Version to use for the scala-xml dependency.") - val scalaCheckVersion = settingKey[String]("Version to use for the scalacheck dependency.") } diff --git a/src/main/scala/scala/tools/partest/TestKinds.scala b/src/main/scala/scala/tools/partest/TestKinds.scala index 8caf75c..92b1a55 100644 --- a/src/main/scala/scala/tools/partest/TestKinds.scala +++ b/src/main/scala/scala/tools/partest/TestKinds.scala @@ -4,7 +4,7 @@ package partest import nest.PathSettings.srcDir object TestKinds { - val standardKinds = ("pos neg run jvm res scalacheck scalap specialized instrumented presentation" split "\\s+").toList + val standardKinds = ("pos neg run jvm res scalap specialized instrumented presentation" split "\\s+").toList def denotesTestFile(p: Path) = p.isFile && p.hasExtension("scala", "res", "xml") def denotesTestDir(p: Path) = kindOf(p) match { diff --git a/src/main/scala/scala/tools/partest/nest/Runner.scala b/src/main/scala/scala/tools/partest/nest/Runner.scala index aabfe27..40b7da8 100644 --- a/src/main/scala/scala/tools/partest/nest/Runner.scala +++ b/src/main/scala/scala/tools/partest/nest/Runner.scala @@ -573,51 +573,6 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner, val nestUI: NestU case _ => Array.empty[String] } - def runScalacheckTest() = runTestCommon { - nestUI.verbose(f"compilation of $testFile succeeded%n") - - val logWriter = new PrintStream(new FileOutputStream(logFile), true) - - def runInFramework(): Boolean = { - import org.scalatools.testing._ - // getClass.getClassLoader.instantiate[Framework]("org.scalacheck.ScalaCheckFramework") - val f: Framework = new org.scalacheck.ScalaCheckFramework - val logger = new Logger { - def ansiCodesSupported = false //params.env.isSet("colors") - def error(msg: String) = logWriter println msg - def warn(msg: String) = logWriter println msg - def info(msg: String) = logWriter println msg - def debug(msg: String) = logWriter println msg - def trace(t: Throwable) = t printStackTrace logWriter - } - var bad = 0 - val handler = new EventHandler { - // testName, description, result, error - // Result = Success, Failure, Error, Skipped - def handle(event: Event): Unit = event.result match { - case Result.Success => - //case Result.Skipped => // an exhausted test is skipped, therefore bad - case _ => bad += 1 - } - } - val loggers = Array(logger) - val loader = ScalaClassLoader.fromURLs(List(outDir.toURI.toURL), getClass.getClassLoader) - val r = f.testRunner(loader, loggers).asInstanceOf[Runner2] // cast to interface with the fingerprint we want - val claas = "Test" - val fingerprint = f.tests collectFirst { case x: SubclassFingerprint if x.isModule => x } - val args = toolArgs("scalacheck") - nestUI.vlog(s"Run $testFile with args $args") - // set the context class loader for scaladoc/scalacheck tests (FIX ME) - ScalaClassLoader(fileManager.testClassLoader).asContext { - r.run(claas, fingerprint.get, handler, args.toArray) // synchronous? - } - val ok = (bad == 0) - if (!ok) _transcript append logFile.fileContents - ok - } - try nextTestActionExpectTrue("ScalaCheck test failed", runInFramework()) finally logWriter.close() - } - def runResidentTest() = { // simulate resident compiler loop val prompt = "\nnsc> " @@ -693,7 +648,6 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner, val nestUI: NestU else kind match { case "pos" => runTestCommon(true) case "ant" => runAntTest() - case "scalacheck" => runScalacheckTest() case "res" => runResidentTest() case "scalap" => runScalapTest() case "script" => runScriptTest() diff --git a/src/main/scala/scala/tools/partest/nest/RunnerSpec.scala b/src/main/scala/scala/tools/partest/nest/RunnerSpec.scala index 229ac59..850d141 100644 --- a/src/main/scala/scala/tools/partest/nest/RunnerSpec.scala +++ b/src/main/scala/scala/tools/partest/nest/RunnerSpec.scala @@ -20,7 +20,6 @@ trait RunnerSpec extends Spec with Meta.StdOpts with Interpolation { val optAnt = "ant" / "run Ant tests" --? val optScalap = "scalap" / "run scalap tests" --? val optSpecialized = "specialized" / "run specialization tests" --? - val optScalacheck = "scalacheck" / "run ScalaCheck tests" --? val optInstrumented = "instrumented" / "run instrumented tests" --? val optPresentation = "presentation" / "run presentation compiler tests" --?