Skip to content

Commit

Permalink
fix prediction in ProgressCallbackTest
Browse files Browse the repository at this point in the history
  • Loading branch information
bishabosha committed Feb 22, 2024
1 parent 8508076 commit 5ce20cb
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ final class ProgressCallbackTest extends DottyTest:
locally:
// (4) assert that the final progress recorded is at the target phase,
// and progress is equal to the number of phases before the target.
val (befores, target +: next +: _) = runnableSubPhases.span(_ != targetPhase): @unchecked
//
// (4.1) extract the real befores by looking at the runnable phases
val (befores, target +: _) = runnableSubPhases.span(_ != targetPhase): @unchecked
// (4.2) extract the predicted next phase by looking at all phases
val (_, `target` +: next +: _) = allSubPhases.span(_ != targetPhase): @unchecked
// (4.1) we expect cancellation to occur *as we enter* the target phase,
// so no units should be visited in this phase. Therefore progress
// should be equal to the number of phases before the target. (as we have 1 unit)
Expand Down

0 comments on commit 5ce20cb

Please sign in to comment.