From 34a610617088f07f1fc6810001ba1e49d0712b65 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 2 Feb 2023 01:01:32 +0900 Subject: [PATCH] Add more logging in `TestScenePause` to better understand test failures --- osu.Game.Tests/Visual/Gameplay/TestScenePause.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/osu.Game.Tests/Visual/Gameplay/TestScenePause.cs b/osu.Game.Tests/Visual/Gameplay/TestScenePause.cs index f1435094b3..b20f03cac8 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestScenePause.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestScenePause.cs @@ -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 occured ({currentTime:N1} -> {lastTime:N1}"); + lastTime = currentTime; }; });