1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 14:12:56 +08:00

Fix test failure under visual tests due to double firing

This commit is contained in:
Dean Herbert 2021-07-17 14:33:02 +09:00
parent db4d64effb
commit 23ed77f2c6

View File

@ -65,19 +65,16 @@ namespace osu.Game.Tests.Visual.UserInterface
AddStep($"set mistimed to {(allowMistimed ? "allowed" : "disallowed")}", () => beatContainer.AllowMistimedEventFiring = allowMistimed);
AddStep("bind event", () =>
AddStep("Set time before zero", () =>
{
beatContainer.NewBeat = (i, timingControlPoint, effectControlPoint, channelAmplitudes) =>
{
lastActuationTime = gameplayClockContainer.CurrentTime;
lastTimingPoint = timingControlPoint;
lastBeatIndex = i;
beatContainer.NewBeat = null;
};
});
AddStep("Set time before zero", () =>
{
lastBeatIndex = null;
gameplayClockContainer.Seek(-1000);
});
@ -99,19 +96,14 @@ namespace osu.Game.Tests.Visual.UserInterface
int? lastBeatIndex = null;
double? lastBpm = null;
AddStep("bind event", () =>
AddStep("Set time before zero", () =>
{
beatContainer.NewBeat = (i, timingControlPoint, effectControlPoint, channelAmplitudes) =>
{
lastBeatIndex = i;
lastBpm = timingControlPoint.BPM;
};
});
AddStep("Set time before zero", () =>
{
lastBeatIndex = null;
lastBpm = null;
gameplayClockContainer.Seek(-1000);
});