From 8a4578311e4d11c06bfb4fe04e5bf414b94d24e8 Mon Sep 17 00:00:00 2001 From: Christopher Vogt Date: Wed, 30 Mar 2016 21:21:05 -0400 Subject: Typed passing of values from Stage1 to Stage2 (thing can still be cleaned up) --- test/test.scala | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/test.scala b/test/test.scala index e623d34..7261287 100644 --- a/test/test.scala +++ b/test/test.scala @@ -4,9 +4,9 @@ import scala.collection.immutable.Seq // micro framework object Main{ - def main(args: Array[String]): Unit = { - val init = new Init(args) - implicit val logger: Logger = init.logger + def main(_args: Array[String]): Unit = { + val args = new Stage1ArgsParser(_args.toVector) + implicit val logger: Logger = new Logger(args.enabledLoggers) var successes = 0 var failures = 0 @@ -24,9 +24,9 @@ object Main{ }.get } - def runCbt(path: String, args: Seq[String])(implicit logger: Logger): Result = { + def runCbt(path: String, _args: Seq[String])(implicit logger: Logger): Result = { import java.io._ - val allArgs: Seq[String] = ((cbtHome.string ++ "/cbt") +: "direct" +: (args ++ init.propsRaw)) + val allArgs: Seq[String] = ((cbtHome.string ++ "/cbt") +: "direct" +: (_args ++ args.propsRaw)) logger.test(allArgs.toString) val pb = new ProcessBuilder( allArgs :_* ) pb.directory(cbtHome ++ ("/test/" ++ path)) @@ -61,7 +61,7 @@ object Main{ // assert(res.err == "", res.err) // FIXME: enable this } - logger.test( "Running tests " ++ args.toList.toString ) + logger.test( "Running tests " ++ _args.toList.toString ) usage("nothing") compile("nothing") -- cgit v1.2.3