summaryrefslogtreecommitdiff
path: root/main/test/src/eval
diff options
context:
space:
mode:
Diffstat (limited to 'main/test/src/eval')
-rw-r--r--main/test/src/eval/CrossTests.scala8
-rw-r--r--main/test/src/eval/EvaluationTests.scala38
-rw-r--r--main/test/src/eval/FailureTests.scala8
-rw-r--r--main/test/src/eval/JavaCompileJarTests.scala2
-rw-r--r--main/test/src/eval/ModuleTests.scala4
-rw-r--r--main/test/src/eval/TarjanTests.scala24
-rw-r--r--main/test/src/eval/TaskTests.scala6
7 files changed, 45 insertions, 45 deletions
diff --git a/main/test/src/eval/CrossTests.scala b/main/test/src/eval/CrossTests.scala
index f194924e..d3dd956c 100644
--- a/main/test/src/eval/CrossTests.scala
+++ b/main/test/src/eval/CrossTests.scala
@@ -8,7 +8,7 @@ import mill.util.TestGraphs.{crossResolved, doubleCross, nestedCrosses, singleCr
import utest._
object CrossTests extends TestSuite{
val tests = Tests{
- 'singleCross - {
+ test("singleCross"){
val check = new TestEvaluator(singleCross)
val Right(("210", 1)) = check.apply(singleCross.cross("210").suffix)
@@ -16,7 +16,7 @@ object CrossTests extends TestSuite{
val Right(("212", 1)) = check.apply(singleCross.cross("212").suffix)
}
- 'crossResolved - {
+ test("crossResolved"){
val check = new TestEvaluator(crossResolved)
val Right(("2.10", 1)) = check.apply(crossResolved.foo("2.10").suffix)
@@ -29,7 +29,7 @@ object CrossTests extends TestSuite{
}
- 'doubleCross - {
+ test("doubleCross"){
val check = new TestEvaluator(doubleCross)
val Right(("210_jvm", 1)) = check.apply(doubleCross.cross("210", "jvm").suffix)
@@ -41,7 +41,7 @@ object CrossTests extends TestSuite{
val Right(("212_native", 1)) = check.apply(doubleCross.cross("212", "native").suffix)
}
- 'nestedCrosses - {
+ test("nestedCrosses"){
val check = new TestEvaluator(nestedCrosses)
val Right(("210_jvm", 1)) = check.apply(nestedCrosses.cross("210").cross2("jvm").suffix)
diff --git a/main/test/src/eval/EvaluationTests.scala b/main/test/src/eval/EvaluationTests.scala
index 7f924db2..abf394d5 100644
--- a/main/test/src/eval/EvaluationTests.scala
+++ b/main/test/src/eval/EvaluationTests.scala
@@ -1,7 +1,7 @@
package mill.eval
-import mill.util.TestUtil.{Test, test}
+import mill.util.TestUtil.Test
import mill.define.{Discover, Graph, Target, Task}
import mill.{Module, T}
import mill.util.{DummyLogger, TestEvaluator, TestGraphs, TestUtil}
@@ -55,9 +55,9 @@ object EvaluationTests extends TestSuite{
object graphs extends TestGraphs()
import graphs._
import TestGraphs._
- 'evaluateSingle - {
+ test("evaluateSingle"){
- 'singleton - {
+ test("singleton"){
import singleton._
val check = new Checker(singleton)
// First time the target is evaluated
@@ -67,7 +67,7 @@ object EvaluationTests extends TestSuite{
// After incrementing the counter, it forces re-evaluation
check(single, expValue = 1, expEvaled = Agg(single))
}
- 'backtickIdentifiers - {
+ test("backtickIdentifiers"){
import graphs.bactickIdentifiers._
val check = new Checker(bactickIdentifiers)
@@ -79,7 +79,7 @@ object EvaluationTests extends TestSuite{
`up-target`.counter += 1
check(`a-down-target`, expValue = 2, expEvaled = Agg(`up-target`, `a-down-target`))
}
- 'pair - {
+ test("pair"){
import pair._
val check = new Checker(pair)
check(down, expValue = 0, expEvaled = Agg(up, down))
@@ -90,7 +90,7 @@ object EvaluationTests extends TestSuite{
up.counter += 1
check(down, expValue = 2, expEvaled = Agg(up, down))
}
- 'anonTriple - {
+ test("anonTriple"){
import anonTriple._
val check = new Checker(anonTriple)
val middle = down.inputs(0)
@@ -106,7 +106,7 @@ object EvaluationTests extends TestSuite{
check(down, expValue = 3, expEvaled = Agg(middle, down))
}
- 'diamond - {
+ test("diamond"){
import diamond._
val check = new Checker(diamond)
check(down, expValue = 0, expEvaled = Agg(up, left, right, down))
@@ -124,7 +124,7 @@ object EvaluationTests extends TestSuite{
right.counter += 1
check(down, expValue = 5, expEvaled = Agg(right, down))
}
- 'anonDiamond - {
+ test("anonDiamond"){
import anonDiamond._
val check = new Checker(anonDiamond)
val left = down.inputs(0).asInstanceOf[TestUtil.Test]
@@ -145,7 +145,7 @@ object EvaluationTests extends TestSuite{
check(down, expValue = 5, expEvaled = Agg(left, right, down))
}
- 'bigSingleTerminal - {
+ test("bigSingleTerminal"){
import bigSingleTerminal._
val check = new Checker(bigSingleTerminal)
@@ -164,8 +164,8 @@ object EvaluationTests extends TestSuite{
}
}
- 'evaluateMixed - {
- 'separateGroups - {
+ test("evaluateMixed"){
+ test("separateGroups"){
// Make sure that `left` and `right` are able to recompute separately,
// even though one depends on the other
@@ -184,7 +184,7 @@ object EvaluationTests extends TestSuite{
}
- 'triangleTask - {
+ test("triangleTask"){
import triangleTask._
val checker = new Checker(triangleTask)
@@ -192,7 +192,7 @@ object EvaluationTests extends TestSuite{
checker(left, 1, Agg(), extraEvaled = -1)
}
- 'multiTerminalGroup - {
+ test("multiTerminalGroup"){
import multiTerminalGroup._
val checker = new Checker(multiTerminalGroup)
@@ -200,7 +200,7 @@ object EvaluationTests extends TestSuite{
checker(left, 1, Agg(left), extraEvaled = -1)
}
- 'multiTerminalBoundary - {
+ test("multiTerminalBoundary"){
import multiTerminalBoundary._
@@ -209,7 +209,7 @@ object EvaluationTests extends TestSuite{
checker(task2, 4, Agg(), extraEvaled = -1, secondRunNoOp = false)
}
- 'overrideSuperTask - {
+ test("overrideSuperTask"){
// Make sure you can override targets, call their supers, and have the
// overriden target be allocated a spot within the overriden/ folder of
// the main publically-available target
@@ -231,7 +231,7 @@ object EvaluationTests extends TestSuite{
!overriden.contains("object")
)
}
- 'overrideSuperCommand - {
+ test("overrideSuperCommand"){
// Make sure you can override commands, call their supers, and have the
// overriden command be allocated a spot within the overriden/ folder of
// the main publically-available command
@@ -259,7 +259,7 @@ object EvaluationTests extends TestSuite{
!overriden.contains("object1")
)
}
- 'nullTasks - {
+ test("nullTasks"){
import nullTasks._
val checker = new Checker(nullTasks)
checker(nullTarget1, null, Agg(nullTarget1), extraEvaled = -1)
@@ -286,7 +286,7 @@ object EvaluationTests extends TestSuite{
checker(nc4, null, Agg(nc4), extraEvaled = -1, secondRunNoOp = false)
}
- 'tasksAreUncached - {
+ test("tasksAreUncached"){
// Make sure the tasks `left` and `middle` re-compute every time, while
// the target `right` does not
//
@@ -299,7 +299,7 @@ object EvaluationTests extends TestSuite{
var leftCount = 0
var rightCount = 0
var middleCount = 0
- def up = T{ test.anon() }
+ def up = T{ TestUtil.test.anon() }
def left = T.task{ leftCount += 1; up() + 1 }
def middle = T.task{ middleCount += 1; 100 }
def right = T{ rightCount += 1; 10000 }
diff --git a/main/test/src/eval/FailureTests.scala b/main/test/src/eval/FailureTests.scala
index d1b3c750..eb1f51ef 100644
--- a/main/test/src/eval/FailureTests.scala
+++ b/main/test/src/eval/FailureTests.scala
@@ -12,7 +12,7 @@ object FailureTests extends TestSuite{
val graphs = new mill.util.TestGraphs()
import graphs._
- 'evaluateSingle - {
+ test("evaluateSingle"){
val check = new TestEvaluator(singleton)
check.fail(
target = singleton.single,
@@ -47,7 +47,7 @@ object FailureTests extends TestSuite{
expectedRawValues = Seq(Result.Exception(ex, new OuterStack(Nil)))
)
}
- 'evaluatePair - {
+ test("evaluatePair"){
val check = new TestEvaluator(pair)
check.fail(
pair.down,
@@ -113,7 +113,7 @@ object FailureTests extends TestSuite{
)
}
- 'evaluateBacktickIdentifiers - {
+ test("evaluateBacktickIdentifiers"){
val check = new TestEvaluator(bactickIdentifiers)
import bactickIdentifiers._
check.fail(
@@ -181,7 +181,7 @@ object FailureTests extends TestSuite{
)
}
- 'multipleUsesOfDest - {
+ test("multipleUsesOfDest"){
object build extends TestUtil.BaseModule {
// Using `T.ctx( ).dest` twice in a single task is ok
def left = T{ + T.ctx().dest.toString.length + T.ctx().dest.toString.length }
diff --git a/main/test/src/eval/JavaCompileJarTests.scala b/main/test/src/eval/JavaCompileJarTests.scala
index 0f9002df..df6e3df5 100644
--- a/main/test/src/eval/JavaCompileJarTests.scala
+++ b/main/test/src/eval/JavaCompileJarTests.scala
@@ -18,7 +18,7 @@ object JavaCompileJarTests extends TestSuite{
}
val tests = Tests{
- 'javac {
+ test("javac"){
val javacSrcPath = os.pwd / 'main / 'test / 'resources / 'examples / 'javac
val javacDestPath = TestUtil.getOutPath() / 'src
diff --git a/main/test/src/eval/ModuleTests.scala b/main/test/src/eval/ModuleTests.scala
index f28fc9b6..2decd6a7 100644
--- a/main/test/src/eval/ModuleTests.scala
+++ b/main/test/src/eval/ModuleTests.scala
@@ -20,7 +20,7 @@ object ModuleTests extends TestSuite{
}
val tests = Tests {
os.remove.all(TestEvaluator.externalOutPath)
- 'externalModuleTargetsAreNamespacedByModulePackagePath - {
+ test("externalModuleTargetsAreNamespacedByModulePackagePath"){
val check = new TestEvaluator(Build)
val zresult = check.apply(Build.z)
assert(
@@ -30,7 +30,7 @@ object ModuleTests extends TestSuite{
os.read(TestEvaluator.externalOutPath / 'mill / 'eval / 'ModuleTests / 'ExternalModule / 'inner / 'y / "meta.json").contains("17")
)
}
- 'externalModuleMustBeGlobalStatic - {
+ test("externalModuleMustBeGlobalStatic"){
object Build extends mill.define.ExternalModule {
diff --git a/main/test/src/eval/TarjanTests.scala b/main/test/src/eval/TarjanTests.scala
index 2f9d0a4d..f430d013 100644
--- a/main/test/src/eval/TarjanTests.scala
+++ b/main/test/src/eval/TarjanTests.scala
@@ -10,40 +10,40 @@ object TarjanTests extends TestSuite{
}
val tests = Tests{
//
- 'empty - check(Seq(), Seq())
+ test("empty") - check(Seq(), Seq())
// (0)
- 'singleton - check(Seq(Seq()), Seq(Seq(0)))
+ test("singleton") - check(Seq(Seq()), Seq(Seq(0)))
// (0)-.
// ^._/
- 'selfCycle - check(Seq(Seq(0)), Seq(Seq(0)))
+ test("selfCycle") - check(Seq(Seq(0)), Seq(Seq(0)))
// (0) <-> (1)
- 'simpleCycle- check(Seq(Seq(1), Seq(0)), Seq(Seq(1, 0)))
+ test("simpleCycle") - check(Seq(Seq(1), Seq(0)), Seq(Seq(1, 0)))
// (0) (1) (2)
- 'multipleSingletons - check(
+ test("multipleSingletons") - check(
Seq(Seq(), Seq(), Seq()),
Seq(Seq(0), Seq(1), Seq(2))
)
// (0) -> (1) -> (2)
- 'straightLineNoCycles- check(
+ test("straightLineNoCycles") - check(
Seq(Seq(1), Seq(2), Seq()),
Seq(Seq(2), Seq(1), Seq(0))
)
// (0) <- (1) <- (2)
- 'straightLineNoCyclesReversed- check(
+ test("straightLineNoCyclesReversed") - check(
Seq(Seq(), Seq(0), Seq(1)),
Seq(Seq(0), Seq(1), Seq(2))
)
// (0) <-> (1) (2) -> (3) -> (4)
// ^.____________/
- 'independentSimpleCycles - check(
+ test("independentSimpleCycles") - check(
Seq(Seq(1), Seq(0), Seq(3), Seq(4), Seq(2)),
Seq(Seq(1, 0), Seq(4, 3, 2))
)
@@ -52,7 +52,7 @@ object TarjanTests extends TestSuite{
// v \
// (0) <-> (1) (2) -> (3) -> (4)
// ^.____________/
- 'independentLinkedCycles - check(
+ test("independentLinkedCycles") - check(
Seq(Seq(1), Seq(0), Seq(3), Seq(4), Seq(2, 1)),
Seq(Seq(1, 0), Seq(4, 3, 2))
)
@@ -60,7 +60,7 @@ object TarjanTests extends TestSuite{
// / v
// (0) <-> (1) (2) -> (3) -> (4)
// ^.____________/
- 'independentLinkedCycles2 - check(
+ test("independentLinkedCycles2") - check(
Seq(Seq(1, 2), Seq(0), Seq(3), Seq(4), Seq(2)),
Seq(Seq(4, 3, 2), Seq(1, 0))
)
@@ -70,7 +70,7 @@ object TarjanTests extends TestSuite{
// (0) <-> (1) (2) -> (3) -> (4)
// ^. ^.____________/
// \________________/
- 'combinedCycles - check(
+ test("combinedCycles") - check(
Seq(Seq(1, 2), Seq(0), Seq(3), Seq(4), Seq(2, 1)),
Seq(Seq(4, 3, 2, 1, 0))
)
@@ -82,7 +82,7 @@ object TarjanTests extends TestSuite{
// / /
// v /
// (9) <--------'
- 'combinedCycles - check(
+ test("combinedCycles") - check(
Seq(Seq(1), Seq(0), Seq(0, 1), Seq(2, 4, 7, 9), Seq(3), Seq(4, 8), Seq(9), Seq(6), Seq(), Seq()),
Seq(Seq(0, 1), Seq(2), Seq(9), Seq(6), Seq(7), Seq(3, 4), Seq(8), Seq(5))
)
diff --git a/main/test/src/eval/TaskTests.scala b/main/test/src/eval/TaskTests.scala
index 0bfd8efc..8449a62f 100644
--- a/main/test/src/eval/TaskTests.scala
+++ b/main/test/src/eval/TaskTests.scala
@@ -53,7 +53,7 @@ object TaskTests extends TestSuite{
}
}
- 'inputs - {
+ test("inputs"){
// Inputs always re-evaluate, including forcing downstream cached Targets
// to re-evaluate, but normal Tasks behind a Target run once then are cached
val check = new TestEvaluator(build)
@@ -67,7 +67,7 @@ object TaskTests extends TestSuite{
val Right((4, 0)) = check.apply(build.taskNoInput)
}
- 'persistent - {
+ test("persistent"){
// Persistent tasks keep the working dir around between runs
val check = new TestEvaluator(build)
val Right((1, 1)) = check.apply(build.persistent)
@@ -79,7 +79,7 @@ object TaskTests extends TestSuite{
val Right((1, 1)) = check.apply(build.nonPersistent)
}
- 'worker - {
+ test("worker"){
// Persistent task
def check = new TestEvaluator(build)