mirror of https://github.com/ppy/osu
Fix test regressions on windows due to `Reset` never being called
I'm not sure this is great. Without calling `Reset`, the correct initial time may not be set (ever). In practice this doesn't happen anywhere in the gameplay flow, but something worth noting. This change is required now that `Reset` isn't called in the constructor. It couldn't be called in the constructor because it would cause the audio track to reset its position too early. What an ordeal.
This commit is contained in:
parent
29fed0c4a3
commit
46d000b8ce
|
@ -84,7 +84,7 @@ public void TestSamplePlaybackAtZero()
|
|||
});
|
||||
});
|
||||
|
||||
AddStep("reset clock", () => gameplayContainer.Start());
|
||||
AddStep("reset clock", () => gameplayContainer.Reset(startClock: true));
|
||||
|
||||
AddUntilStep("sample played", () => sample.RequestedPlaying);
|
||||
AddUntilStep("sample has lifetime end", () => sample.LifetimeEnd < double.MaxValue);
|
||||
|
@ -147,7 +147,7 @@ public void TestSamplePlaybackWithBeatmapHitsoundsOff()
|
|||
});
|
||||
});
|
||||
|
||||
AddStep("start", () => gameplayContainer.Start());
|
||||
AddStep("reset clock", () => gameplayContainer.Reset(startClock: true));
|
||||
|
||||
AddUntilStep("sample played", () => sample.IsPlayed);
|
||||
AddUntilStep("sample has lifetime end", () => sample.LifetimeEnd < double.MaxValue);
|
||||
|
|
Loading…
Reference in New Issue