mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 22:33:05 +08:00
Make combo assertion actually work as expected
This commit is contained in:
parent
e874ec81c9
commit
7211c88e83
@ -200,9 +200,10 @@ namespace osu.Game.Rulesets.Mania.Tests
|
|||||||
});
|
});
|
||||||
|
|
||||||
assertHeadJudgement(HitResult.Perfect);
|
assertHeadJudgement(HitResult.Perfect);
|
||||||
assertCombo(1);
|
assertComboAtJudgement(0, 1);
|
||||||
assertTailJudgement(HitResult.Meh);
|
assertTailJudgement(HitResult.Meh);
|
||||||
assertCombo(1);
|
assertComboAtJudgement(1, 0);
|
||||||
|
assertComboAtJudgement(2, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -521,8 +522,8 @@ namespace osu.Game.Rulesets.Mania.Tests
|
|||||||
private void assertNoteJudgement(HitResult result)
|
private void assertNoteJudgement(HitResult result)
|
||||||
=> AddAssert($"hold note judged as {result}", () => judgementResults.Single(j => j.HitObject is HoldNote).Type, () => Is.EqualTo(result));
|
=> AddAssert($"hold note judged as {result}", () => judgementResults.Single(j => j.HitObject is HoldNote).Type, () => Is.EqualTo(result));
|
||||||
|
|
||||||
private void assertCombo(int combo)
|
private void assertComboAtJudgement(int judgementIndex, int combo)
|
||||||
=> AddAssert($"combo is {combo}", () => currentPlayer.ScoreProcessor.Combo.Value, () => Is.EqualTo(combo));
|
=> AddAssert($"combo at judgement {judgementIndex} is {combo}", () => judgementResults.ElementAt(judgementIndex).ComboAfterJudgement, () => Is.EqualTo(combo));
|
||||||
|
|
||||||
private ScoreAccessibleReplayPlayer currentPlayer = null!;
|
private ScoreAccessibleReplayPlayer currentPlayer = null!;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user