mirror of
https://github.com/ppy/osu.git
synced 2025-01-08 05:52:54 +08:00
Add failing test coverage showing that replay will fail on exiting gameplay
This commit is contained in:
parent
15c44a2817
commit
a81408ca06
@ -8,6 +8,7 @@ using osu.Framework.Testing;
|
|||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Rulesets.Osu;
|
using osu.Game.Rulesets.Osu;
|
||||||
|
using osu.Game.Scoring;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
using osu.Game.Tests.Beatmaps;
|
using osu.Game.Tests.Beatmaps;
|
||||||
using osuTK.Input;
|
using osuTK.Input;
|
||||||
@ -45,6 +46,18 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
AddAssert("Time still stopped", () => lastTime == Player.GameplayClockContainer.CurrentTime);
|
AddAssert("Time still stopped", () => lastTime == Player.GameplayClockContainer.CurrentTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestDoesNotFailOnExit()
|
||||||
|
{
|
||||||
|
loadPlayerWithBeatmap();
|
||||||
|
|
||||||
|
AddUntilStep("wait for first hit", () => Player.ScoreProcessor.TotalScore.Value > 0);
|
||||||
|
AddAssert("ensure rank is not fail", () => Player.ScoreProcessor.Rank.Value, () => Is.Not.EqualTo(ScoreRank.F));
|
||||||
|
AddStep("exit player", () => Player.Exit());
|
||||||
|
AddUntilStep("wait for exit", () => Player.Parent == null);
|
||||||
|
AddAssert("ensure rank is not fail", () => Player.ScoreProcessor.Rank.Value, () => Is.Not.EqualTo(ScoreRank.F));
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestPauseViaSpaceWithSkip()
|
public void TestPauseViaSpaceWithSkip()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user