From bfd64f104a283b70ad57a66c8ac7d4dc3bda9e6f Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Fri, 2 Feb 2018 23:58:00 -0800 Subject: Make `TestEvaluator` infer it's `outPath` from the `sourcecode.FullName` and `utest.framework.TestPath` --- scalalib/test/src/mill/scalalib/GenIdeaTests.scala | 5 +--- .../test/src/mill/scalalib/HelloWorldTests.scala | 30 +++++----------------- 2 files changed, 7 insertions(+), 28 deletions(-) (limited to 'scalalib') diff --git a/scalalib/test/src/mill/scalalib/GenIdeaTests.scala b/scalalib/test/src/mill/scalalib/GenIdeaTests.scala index ea8cfc82..13c988bc 100644 --- a/scalalib/test/src/mill/scalalib/GenIdeaTests.scala +++ b/scalalib/test/src/mill/scalalib/GenIdeaTests.scala @@ -19,10 +19,7 @@ object GenIdeaTests extends TestSuite { object HelloWorld extends TestUtil.BaseModule with HelloWorldModule - val helloWorldEvaluator = new TestEvaluator( - HelloWorld, - outPath - ) + val helloWorldEvaluator = TestEvaluator.static(HelloWorld) def tests: Tests = Tests { 'genIdeaTests - { diff --git a/scalalib/test/src/mill/scalalib/HelloWorldTests.scala b/scalalib/test/src/mill/scalalib/HelloWorldTests.scala index 14012809..a56bc66e 100644 --- a/scalalib/test/src/mill/scalalib/HelloWorldTests.scala +++ b/scalalib/test/src/mill/scalalib/HelloWorldTests.scala @@ -82,30 +82,12 @@ object HelloWorldTests extends TestSuite { - val helloWorldEvaluator = new TestEvaluator( - HelloWorld, - outPath - ) - val helloWorldWithMainEvaluator = new TestEvaluator( - HelloWorldWithMain, - outPath - ) - val helloWorldWithMainAssemblyEvaluator = new TestEvaluator( - HelloWorldWithMainAssembly, - outPath - ) - val helloWorldFatalEvaluator = new TestEvaluator( - HelloWorldFatalWarnings, - outPath - ) - val helloWorldOverrideEvaluator = new TestEvaluator( - HelloWorldScalaOverride, - outPath - ) - val helloWorldCrossEvaluator = new TestEvaluator( - CrossHelloWorld, - outPath - ) + val helloWorldEvaluator = TestEvaluator.static(HelloWorld) + val helloWorldWithMainEvaluator = TestEvaluator.static(HelloWorldWithMain) + val helloWorldWithMainAssemblyEvaluator = TestEvaluator.static(HelloWorldWithMainAssembly) + val helloWorldFatalEvaluator = TestEvaluator.static(HelloWorldFatalWarnings) + val helloWorldOverrideEvaluator = TestEvaluator.static(HelloWorldScalaOverride) + val helloWorldCrossEvaluator = TestEvaluator.static(CrossHelloWorld) def tests: Tests = Tests { -- cgit v1.2.3