Skip to content

Commit 08460c4

Browse files
committed
fix prediction in ProgressCallbackTest
1 parent efd0692 commit 08460c4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: compiler/test/dotty/tools/dotc/sbt/ProgressCallbackTest.scala

+5-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ final class ProgressCallbackTest extends DottyTest:
9797
locally:
9898
// (4) assert that the final progress recorded is at the target phase,
9999
// and progress is equal to the number of phases before the target.
100-
val (befores, target +: next +: _) = runnableSubPhases.span(_ != targetPhase): @unchecked
100+
//
101+
// (4.1) extract the real befores by looking at the runnable phases
102+
val (befores, target +: _) = runnableSubPhases.span(_ != targetPhase): @unchecked
103+
// (4.2) extract the predicted next phase by looking at all phases
104+
val (_, `target` +: next +: _) = allSubPhases.span(_ != targetPhase): @unchecked
101105
// (4.1) we expect cancellation to occur *as we enter* the target phase,
102106
// so no units should be visited in this phase. Therefore progress
103107
// should be equal to the number of phases before the target. (as we have 1 unit)

0 commit comments

Comments
 (0)