1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-05 11:43:01 +08:00

Merge pull request #22484 from peppy/add-more-logging

Add more logging in `TestScenePause` to better understand test failures
This commit is contained in:
Bartłomiej Dach 2023-02-01 23:43:09 +01:00 committed by GitHub
commit 3d59516b3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,6 +9,7 @@ using osu.Framework.Allocation;
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 @@ namespace osu.Game.Tests.Visual.Gameplay
Player.OnUpdate += _ =>
{
double currentTime = Player.GameplayClockContainer.CurrentTime;
alwaysGoingForward &= currentTime >= lastTime - 500;
bool goingForward = currentTime >= lastTime - 500;
alwaysGoingForward &= goingForward;
if (!goingForward)
Logger.Log($"Backwards time occurred ({currentTime:N1} -> {lastTime:N1})");
lastTime = currentTime;
};
});