mirror of
https://github.com/ppy/osu.git
synced 2025-01-21 08:52:54 +08:00
Add early assert as sanity check
This commit is contained in:
parent
75f9250645
commit
274958669c
@ -39,7 +39,9 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
public void TestDoesntPauseDuringIntro()
|
public void TestDoesntPauseDuringIntro()
|
||||||
{
|
{
|
||||||
AddStep("set inactive", () => ((Bindable<bool>)host.IsActive).Value = false);
|
AddStep("set inactive", () => ((Bindable<bool>)host.IsActive).Value = false);
|
||||||
|
|
||||||
AddStep("resume player", () => Player.GameplayClockContainer.Start());
|
AddStep("resume player", () => Player.GameplayClockContainer.Start());
|
||||||
|
AddAssert("ensure not paused", () => !Player.GameplayClockContainer.IsPaused.Value);
|
||||||
AddUntilStep("wait for pause", () => Player.GameplayClockContainer.IsPaused.Value);
|
AddUntilStep("wait for pause", () => Player.GameplayClockContainer.IsPaused.Value);
|
||||||
AddAssert("time of pause is after gameplay start time", () => Player.GameplayClockContainer.GameplayClock.CurrentTime >= Player.DrawableRuleset.GameplayStartTime);
|
AddAssert("time of pause is after gameplay start time", () => Player.GameplayClockContainer.GameplayClock.CurrentTime >= Player.DrawableRuleset.GameplayStartTime);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user