From 1005b7ac858c6d96780b33d199101f8044026e4a Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 5 Oct 2023 14:32:53 +0900 Subject: [PATCH] Fix incorrect test assumption in `TestSceneEditorClock` I don't know what this test was trying to do, but it was wrong. Any offset which is applied should be invisible to the clock's final `CurrentTime` (and to the user). --- osu.Game.Tests/Visual/Editing/TestSceneEditorClock.cs | 2 +- osu.Game/Screens/Edit/EditorClock.cs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/osu.Game.Tests/Visual/Editing/TestSceneEditorClock.cs b/osu.Game.Tests/Visual/Editing/TestSceneEditorClock.cs index 82d2542190..ed58c59ff0 100644 --- a/osu.Game.Tests/Visual/Editing/TestSceneEditorClock.cs +++ b/osu.Game.Tests/Visual/Editing/TestSceneEditorClock.cs @@ -63,7 +63,7 @@ namespace osu.Game.Tests.Visual.Editing AddStep("seek near end", () => EditorClock.Seek(EditorClock.TrackLength - 250)); AddUntilStep("clock stops", () => !EditorClock.IsRunning); - AddUntilStep("clock stopped at end", () => EditorClock.CurrentTime - EditorClock.TotalAppliedOffset, () => Is.EqualTo(EditorClock.TrackLength)); + AddUntilStep("clock stopped at end", () => EditorClock.CurrentTime, () => Is.EqualTo(EditorClock.TrackLength)); AddStep("start clock again", () => EditorClock.Start()); AddAssert("clock looped to start", () => EditorClock.IsRunning && EditorClock.CurrentTime < 500); diff --git a/osu.Game/Screens/Edit/EditorClock.cs b/osu.Game/Screens/Edit/EditorClock.cs index d4de1bae5f..d5ca6fc35e 100644 --- a/osu.Game/Screens/Edit/EditorClock.cs +++ b/osu.Game/Screens/Edit/EditorClock.cs @@ -158,8 +158,6 @@ namespace osu.Game.Screens.Edit public double CurrentTime => underlyingClock.CurrentTime; - public double TotalAppliedOffset => underlyingClock.TotalAppliedOffset; - public void Reset() { ClearTransforms();