Add more logging in `TestScenePause` to better understand test failures

This commit is contained in:
Dean Herbert 2023-02-02 01:01:32 +09:00
parent baeae89c8c
commit 34a6106170
1 changed files with 8 additions and 1 deletions

View File

@ -9,6 +9,7 @@
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Logging;
using osu.Framework.Screens;
using osu.Framework.Testing;
using osu.Game.Configuration;
@ -89,7 +90,13 @@ public void TestPauseWithLargeOffset()
Player.OnUpdate += _ =>
{
double currentTime = Player.GameplayClockContainer.CurrentTime;
alwaysGoingForward &= currentTime >= lastTime - 500;
bool goingForward = currentTime >= lastTime - 500;
alwaysGoingForward &= goingForward;
if (!goingForward)
Logger.Log($"Backwards time occured ({currentTime:N1} -> {lastTime:N1}");
lastTime = currentTime;
};
});