1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-09 02:24:10 +08:00

Fix test not compiling

A little ugly but maybe it'll do...
This commit is contained in:
Bartłomiej Dach 2024-06-07 09:54:00 +02:00
parent 4cd1ccc4d4
commit 199d31c0f4
No known key found for this signature in database

View File

@ -3,9 +3,11 @@
using NUnit.Framework; using NUnit.Framework;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Game.Rulesets.Osu; using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Scoring; using osu.Game.Rulesets.Scoring;
using osu.Game.Scoring;
using osu.Game.Screens.Play.HUD; using osu.Game.Screens.Play.HUD;
using osu.Game.Skinning; using osu.Game.Skinning;
@ -16,6 +18,8 @@ namespace osu.Game.Tests.Visual.Gameplay
[Cached] [Cached]
private ScoreProcessor scoreProcessor = new ScoreProcessor(new OsuRuleset()); private ScoreProcessor scoreProcessor = new ScoreProcessor(new OsuRuleset());
private Bindable<ScoreRank> rank => (Bindable<ScoreRank>)scoreProcessor.Rank;
protected override Drawable CreateDefaultImplementation() => new DefaultRankDisplay(); protected override Drawable CreateDefaultImplementation() => new DefaultRankDisplay();
protected override Drawable CreateLegacyImplementation() => new LegacyRankDisplay(); protected override Drawable CreateLegacyImplementation() => new LegacyRankDisplay();
@ -23,15 +27,15 @@ namespace osu.Game.Tests.Visual.Gameplay
[Test] [Test]
public void TestChangingRank() public void TestChangingRank()
{ {
AddStep("Set rank to SS Hidden", () => scoreProcessor.Rank.Value = Scoring.ScoreRank.XH); AddStep("Set rank to SS Hidden", () => rank.Value = ScoreRank.XH);
AddStep("Set rank to SS", () => scoreProcessor.Rank.Value = Scoring.ScoreRank.X); AddStep("Set rank to SS", () => rank.Value = ScoreRank.X);
AddStep("Set rank to S Hidden", () => scoreProcessor.Rank.Value = Scoring.ScoreRank.SH); AddStep("Set rank to S Hidden", () => rank.Value = ScoreRank.SH);
AddStep("Set rank to S", () => scoreProcessor.Rank.Value = Scoring.ScoreRank.S); AddStep("Set rank to S", () => rank.Value = ScoreRank.S);
AddStep("Set rank to A", () => scoreProcessor.Rank.Value = Scoring.ScoreRank.A); AddStep("Set rank to A", () => rank.Value = ScoreRank.A);
AddStep("Set rank to B", () => scoreProcessor.Rank.Value = Scoring.ScoreRank.B); AddStep("Set rank to B", () => rank.Value = ScoreRank.B);
AddStep("Set rank to C", () => scoreProcessor.Rank.Value = Scoring.ScoreRank.C); AddStep("Set rank to C", () => rank.Value = ScoreRank.C);
AddStep("Set rank to D", () => scoreProcessor.Rank.Value = Scoring.ScoreRank.D); AddStep("Set rank to D", () => rank.Value = ScoreRank.D);
AddStep("Set rank to F", () => scoreProcessor.Rank.Value = Scoring.ScoreRank.F); AddStep("Set rank to F", () => rank.Value = ScoreRank.F);
} }
} }
} }