11package mill .eval
22
3- import mill .util .TestUtil .{Test , test }
3+ import mill .util .TestUtil .{Test , test as tuTest }
44import mill .define .{TargetImpl , Task }
55import mill .T
66import mill .util .{TestGraphs , TestUtil }
@@ -61,9 +61,10 @@ class EvaluationTests(threadCount: Option[Int]) extends TestSuite {
6161 object graphs extends TestGraphs ()
6262 import graphs ._
6363 import TestGraphs ._
64- utest.test(" evaluateSingle" ) {
64+ import utest ._
65+ test(" evaluateSingle" ) {
6566
66- utest. test(" singleton" ) {
67+ test(" singleton" ) {
6768 import singleton ._
6869 val check = new Checker (singleton)
6970 // First time the target is evaluated
@@ -73,7 +74,7 @@ class EvaluationTests(threadCount: Option[Int]) extends TestSuite {
7374 // After incrementing the counter, it forces re-evaluation
7475 check(single, expValue = 1 , expEvaled = Agg (single))
7576 }
76- utest. test(" backtickIdentifiers" ) {
77+ test(" backtickIdentifiers" ) {
7778 import graphs .bactickIdentifiers ._
7879 val check = new Checker (bactickIdentifiers)
7980
@@ -85,7 +86,7 @@ class EvaluationTests(threadCount: Option[Int]) extends TestSuite {
8586 `up-target`.counter += 1
8687 check(`a-down-target`, expValue = 2 , expEvaled = Agg (`up-target`, `a-down-target`))
8788 }
88- utest. test(" pair" ) {
89+ test(" pair" ) {
8990 import pair ._
9091 val check = new Checker (pair)
9192 check(down, expValue = 0 , expEvaled = Agg (up, down))
@@ -96,7 +97,7 @@ class EvaluationTests(threadCount: Option[Int]) extends TestSuite {
9697 up.counter += 1
9798 check(down, expValue = 2 , expEvaled = Agg (up, down))
9899 }
99- utest. test(" anonTriple" ) {
100+ test(" anonTriple" ) {
100101 import anonTriple ._
101102 val check = new Checker (anonTriple)
102103 val middle = down.inputs(0 )
@@ -112,7 +113,7 @@ class EvaluationTests(threadCount: Option[Int]) extends TestSuite {
112113
113114 check(down, expValue = 3 , expEvaled = Agg (middle, down))
114115 }
115- utest. test(" diamond" ) {
116+ test(" diamond" ) {
116117 import diamond ._
117118 val check = new Checker (diamond)
118119 check(down, expValue = 0 , expEvaled = Agg (up, left, right, down))
@@ -130,7 +131,7 @@ class EvaluationTests(threadCount: Option[Int]) extends TestSuite {
130131 right.counter += 1
131132 check(down, expValue = 5 , expEvaled = Agg (right, down))
132133 }
133- utest. test(" anonDiamond" ) {
134+ test(" anonDiamond" ) {
134135 import anonDiamond ._
135136 val check = new Checker (anonDiamond)
136137 val left = down.inputs(0 ).asInstanceOf [TestUtil .Test ]
@@ -151,7 +152,7 @@ class EvaluationTests(threadCount: Option[Int]) extends TestSuite {
151152 check(down, expValue = 5 , expEvaled = Agg (left, right, down))
152153 }
153154
154- utest. test(" bigSingleTerminal" ) {
155+ test(" bigSingleTerminal" ) {
155156 import bigSingleTerminal ._
156157 val check = new Checker (bigSingleTerminal)
157158
@@ -170,8 +171,8 @@ class EvaluationTests(threadCount: Option[Int]) extends TestSuite {
170171 }
171172 }
172173
173- utest. test(" evaluateMixed" ) {
174- utest. test(" separateGroups" ) {
174+ test(" evaluateMixed" ) {
175+ test(" separateGroups" ) {
175176 // Make sure that `left` and `right` are able to recompute separately,
176177 // even though one depends on the other
177178
@@ -189,23 +190,23 @@ class EvaluationTests(threadCount: Option[Int]) extends TestSuite {
189190 assert(filtered3 == Agg (change, right))
190191
191192 }
192- utest. test(" triangleTask" ) {
193+ test(" triangleTask" ) {
193194
194195 import triangleTask ._
195196 val checker = new Checker (triangleTask)
196197 checker(right, 3 , Agg (left, right), extraEvaled = - 1 )
197198 checker(left, 1 , Agg (), extraEvaled = - 1 )
198199
199200 }
200- utest. test(" multiTerminalGroup" ) {
201+ test(" multiTerminalGroup" ) {
201202 import multiTerminalGroup ._
202203
203204 val checker = new Checker (multiTerminalGroup)
204205 checker(right, 1 , Agg (right), extraEvaled = - 1 )
205206 checker(left, 1 , Agg (left), extraEvaled = - 1 )
206207 }
207208
208- utest. test(" multiTerminalBoundary" ) {
209+ test(" multiTerminalBoundary" ) {
209210
210211 import multiTerminalBoundary ._
211212
@@ -214,7 +215,7 @@ class EvaluationTests(threadCount: Option[Int]) extends TestSuite {
214215 checker(task2, 4 , Agg (), extraEvaled = - 1 , secondRunNoOp = false )
215216 }
216217
217- utest. test(" overrideSuperTask" ) {
218+ test(" overrideSuperTask" ) {
218219 // Make sure you can override targets, call their supers, and have the
219220 // overridden target be allocated a spot within the overridden/ folder of
220221 // the main publicly-available target
@@ -234,7 +235,7 @@ class EvaluationTests(threadCount: Option[Int]) extends TestSuite {
234235 ! overridden.contains(" object" )
235236 )
236237 }
237- utest. test(" overrideSuperCommand" ) {
238+ test(" overrideSuperCommand" ) {
238239 // Make sure you can override commands, call their supers, and have the
239240 // overridden command be allocated a spot within the super/ folder of
240241 // the main publicly-available command
@@ -261,7 +262,7 @@ class EvaluationTests(threadCount: Option[Int]) extends TestSuite {
261262 ! overridden.contains(" object1" )
262263 )
263264 }
264- utest. test(" nullTasks" ) {
265+ test(" nullTasks" ) {
265266 import nullTasks ._
266267 val checker = new Checker (nullTasks)
267268 checker(nullTarget1, null , Agg (nullTarget1), extraEvaled = - 1 )
@@ -288,7 +289,7 @@ class EvaluationTests(threadCount: Option[Int]) extends TestSuite {
288289 checker(nc4, null , Agg (nc4), extraEvaled = - 1 , secondRunNoOp = false )
289290 }
290291
291- utest. test(" tasksAreUncached" ) {
292+ test(" tasksAreUncached" ) {
292293 // Make sure the tasks `left` and `middle` re-compute every time, while
293294 // the target `right` does not
294295 //
@@ -301,7 +302,7 @@ class EvaluationTests(threadCount: Option[Int]) extends TestSuite {
301302 var leftCount = 0
302303 var rightCount = 0
303304 var middleCount = 0
304- def up = T { test .anon() }
305+ def up = T { tuTest .anon() () }
305306 def left = T .task { leftCount += 1 ; up() + 1 }
306307 def middle = T .task { middleCount += 1 ; 100 }
307308 def right = T { rightCount += 1 ; 10000 }
@@ -352,7 +353,7 @@ class EvaluationTests(threadCount: Option[Int]) extends TestSuite {
352353 assert(leftCount == 4 , middleCount == 4 , rightCount == 1 )
353354 }
354355 }
355- utest. test(" stackableOverrides" ) {
356+ test(" stackableOverrides" ) {
356357 // Make sure you can override commands, call their supers, and have the
357358 // overridden command be allocated a spot within the super/ folder of
358359 // the main publicly-available command
@@ -376,7 +377,7 @@ class EvaluationTests(threadCount: Option[Int]) extends TestSuite {
376377 )
377378 assert(os.read(checker.evaluator.outPath / " m/f.json" ).contains(" 6," ))
378379 }
379- utest. test(" stackableOverrides2" ) {
380+ test(" stackableOverrides2" ) {
380381 // When the supers have the same name, qualify them until they are distinct
381382 import StackableOverrides2 ._
382383
@@ -398,7 +399,7 @@ class EvaluationTests(threadCount: Option[Int]) extends TestSuite {
398399 )
399400 assert(os.read(checker.evaluator.outPath / " m/f.json" ).contains(" 6," ))
400401 }
401- utest. test(" stackableOverrides3" ) {
402+ test(" stackableOverrides3" ) {
402403 // When the supers have the same name, qualify them until they are distinct
403404 import StackableOverrides3 ._
404405
@@ -420,7 +421,7 @@ class EvaluationTests(threadCount: Option[Int]) extends TestSuite {
420421 )
421422 assert(os.read(checker.evaluator.outPath / " m/f.json" ).contains(" 6," ))
422423 }
423- utest. test(" privateTasksInMixedTraits" ) {
424+ test(" privateTasksInMixedTraits" ) {
424425 // Make sure we can have private cached targets in different trait with the same name,
425426 // and caching still works when these traits are mixed together
426427 import PrivateTasksInMixedTraits ._
0 commit comments