1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-21 08:52:54 +08:00

Fix testcases not working for OD10

This commit is contained in:
smoogipoo 2019-08-30 19:47:13 +09:00
parent 8b4976ad92
commit 6fb8a6cdbe

View File

@ -28,12 +28,11 @@ namespace osu.Game.Tests.Visual.Gameplay
private HitErrorMeter meter; private HitErrorMeter meter;
private HitErrorMeter meter2; private HitErrorMeter meter2;
private HitWindows hitWindows;
public TestSceneBarHitErrorMeter() public TestSceneBarHitErrorMeter()
{ {
var hitWindows = new OsuHitWindows(); recreateDisplay(new OsuHitWindows(), 5);
recreateDisplay(hitWindows, 5);
AddRepeatStep("New random judgement", () => newJudgement(), 40); AddRepeatStep("New random judgement", () => newJudgement(), 40);
@ -72,7 +71,9 @@ namespace osu.Game.Tests.Visual.Gameplay
private void recreateDisplay(HitWindows hitWindows, float overallDifficulty) private void recreateDisplay(HitWindows hitWindows, float overallDifficulty)
{ {
hitWindows.SetDifficulty(overallDifficulty); this.hitWindows = hitWindows;
hitWindows?.SetDifficulty(overallDifficulty);
Clear(); Clear();
@ -84,9 +85,9 @@ namespace osu.Game.Tests.Visual.Gameplay
AutoSizeAxes = Axes.Both, AutoSizeAxes = Axes.Both,
Children = new[] Children = new[]
{ {
new SpriteText { Text = $@"Great: {hitWindows.Great}" }, new SpriteText { Text = $@"Great: {hitWindows?.Great}" },
new SpriteText { Text = $@"Good: {hitWindows.Good}" }, new SpriteText { Text = $@"Good: {hitWindows?.Good}" },
new SpriteText { Text = $@"Meh: {hitWindows.Meh}" }, new SpriteText { Text = $@"Meh: {hitWindows?.Meh}" },
} }
}); });