mirror of https://github.com/ppy/osu
Fix failing test
This commit is contained in:
parent
871adb16e0
commit
ea6318ed73
|
@ -17,9 +17,7 @@ public class TestSceneFailJudgement : AllPlayersTestScene
|
||||||
protected override Player CreatePlayer(Ruleset ruleset)
|
protected override Player CreatePlayer(Ruleset ruleset)
|
||||||
{
|
{
|
||||||
Mods.Value = Array.Empty<Mod>();
|
Mods.Value = Array.Empty<Mod>();
|
||||||
|
return new FailPlayer();
|
||||||
var beatmap = Beatmap.Value.GetPlayableBeatmap(ruleset.RulesetInfo, Array.Empty<Mod>());
|
|
||||||
return new FailPlayer(ruleset.GetAutoplayMod().CreateReplayScore(beatmap));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void AddCheckSteps()
|
protected override void AddCheckSteps()
|
||||||
|
@ -29,16 +27,12 @@ protected override void AddCheckSteps()
|
||||||
AddAssert("total judgements == 1", () => ((FailPlayer)Player).ScoreProcessor.JudgedHits == 1);
|
AddAssert("total judgements == 1", () => ((FailPlayer)Player).ScoreProcessor.JudgedHits == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class FailPlayer : ReplayPlayer
|
private class FailPlayer : TestPlayer
|
||||||
{
|
{
|
||||||
public new DrawableRuleset DrawableRuleset => base.DrawableRuleset;
|
|
||||||
|
|
||||||
public new ScoreProcessor ScoreProcessor => base.ScoreProcessor;
|
public new ScoreProcessor ScoreProcessor => base.ScoreProcessor;
|
||||||
|
|
||||||
protected override bool PauseOnFocusLost => false;
|
public FailPlayer()
|
||||||
|
: base(false, false)
|
||||||
public FailPlayer(Score score)
|
|
||||||
: base(score, false, false)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue