Fix failing test

This commit is contained in:
Dean Herbert
2019-09-06 16:51:30 +09:00
parent 6ce36bd39e
commit b89fb5cdf7
2 changed files with 8 additions and 11 deletions

View File

@ -26,15 +26,7 @@ namespace osu.Game.Tests.Visual.Gameplay
{
AddUntilStep("wait for fail", () => Player.HasFailed);
AddUntilStep("wait for multiple judged objects", () => ((FailPlayer)Player).DrawableRuleset.Playfield.AllHitObjects.Count(h => h.AllJudged) > 1);
AddAssert("total judgements == 1", () =>
{
int count = 0;
foreach (var stat in (HitResult[])Enum.GetValues(typeof(HitResult)))
count += ((FailPlayer)Player).ScoreProcessor.GetStatistic(stat);
return count == 1;
});
AddAssert("total judgements == 1", () => ((FailPlayer)Player).ScoreProcessor.JudgedHits == 1);
}
private class FailPlayer : ReplayPlayer