@@ -573,51 +573,6 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner, val nestUI: NestU
573573 case _ => Array .empty[String ]
574574 }
575575
576- def runScalacheckTest () = runTestCommon {
577- nestUI.verbose(f " compilation of $testFile succeeded%n " )
578-
579- val logWriter = new PrintStream (new FileOutputStream (logFile), true )
580-
581- def runInFramework (): Boolean = {
582- import org .scalatools .testing ._
583- // getClass.getClassLoader.instantiate[Framework]("org.scalacheck.ScalaCheckFramework")
584- val f : Framework = new org.scalacheck.ScalaCheckFramework
585- val logger = new Logger {
586- def ansiCodesSupported = false // params.env.isSet("colors")
587- def error (msg : String ) = logWriter println msg
588- def warn (msg : String ) = logWriter println msg
589- def info (msg : String ) = logWriter println msg
590- def debug (msg : String ) = logWriter println msg
591- def trace (t : Throwable ) = t printStackTrace logWriter
592- }
593- var bad = 0
594- val handler = new EventHandler {
595- // testName, description, result, error
596- // Result = Success, Failure, Error, Skipped
597- def handle (event : Event ): Unit = event.result match {
598- case Result .Success =>
599- // case Result.Skipped => // an exhausted test is skipped, therefore bad
600- case _ => bad += 1
601- }
602- }
603- val loggers = Array (logger)
604- val loader = ScalaClassLoader .fromURLs(List (outDir.toURI.toURL), getClass.getClassLoader)
605- val r = f.testRunner(loader, loggers).asInstanceOf [Runner2 ] // cast to interface with the fingerprint we want
606- val claas = " Test"
607- val fingerprint = f.tests collectFirst { case x : SubclassFingerprint if x.isModule => x }
608- val args = toolArgs(" scalacheck" )
609- nestUI.vlog(s " Run $testFile with args $args" )
610- // set the context class loader for scaladoc/scalacheck tests (FIX ME)
611- ScalaClassLoader (fileManager.testClassLoader).asContext {
612- r.run(claas, fingerprint.get, handler, args.toArray) // synchronous?
613- }
614- val ok = (bad == 0 )
615- if (! ok) _transcript append logFile.fileContents
616- ok
617- }
618- try nextTestActionExpectTrue(" ScalaCheck test failed" , runInFramework()) finally logWriter.close()
619- }
620-
621576 def runResidentTest () = {
622577 // simulate resident compiler loop
623578 val prompt = " \n nsc> "
@@ -693,7 +648,6 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner, val nestUI: NestU
693648 else kind match {
694649 case " pos" => runTestCommon(true )
695650 case " ant" => runAntTest()
696- case " scalacheck" => runScalacheckTest()
697651 case " res" => runResidentTest()
698652 case " scalap" => runScalapTest()
699653 case " script" => runScriptTest()
0 commit comments