Fix potential songselect testcase failures

This commit is contained in:
smoogipoo 2019-06-14 20:18:22 +09:00
parent f66f46bff7
commit 512b9dfd82

View File

@ -18,6 +18,7 @@ using osu.Game.Beatmaps;
using osu.Game.Database; using osu.Game.Database;
using osu.Game.Rulesets; using osu.Game.Rulesets;
using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Osu.Mods; using osu.Game.Rulesets.Osu.Mods;
using osu.Game.Rulesets.Taiko; using osu.Game.Rulesets.Taiko;
using osu.Game.Screens.Select; using osu.Game.Screens.Select;
@ -100,8 +101,11 @@ namespace osu.Game.Tests.Visual.SongSelect
} }
[SetUp] [SetUp]
public virtual void SetUp() => public virtual void SetUp() => Schedule(() =>
Schedule(() => { manager?.Delete(manager.GetAllUsableBeatmapSets()); }); {
Ruleset.Value = new OsuRuleset().RulesetInfo;
manager?.Delete(manager.GetAllUsableBeatmapSets());
});
[Test] [Test]
public void TestDummy() public void TestDummy()
@ -185,7 +189,7 @@ namespace osu.Game.Tests.Visual.SongSelect
AddAssert("empty mods", () => !Mods.Value.Any()); AddAssert("empty mods", () => !Mods.Value.Any());
void onModChange(ValueChangedEvent<IReadOnlyList<Mod>> e) => modChangeIndex = actionIndex++; void onModChange(ValueChangedEvent<IReadOnlyList<Mod>> e) => modChangeIndex = actionIndex++;
void onRulesetChange(ValueChangedEvent<RulesetInfo> e) => rulesetChangeIndex = actionIndex--; void onRulesetChange(ValueChangedEvent<RulesetInfo> e) => rulesetChangeIndex = actionIndex++;
} }
[Test] [Test]