mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 12:53:11 +08:00
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).
This commit is contained in:
parent
354193c53a
commit
1005b7ac85
@ -63,7 +63,7 @@ namespace osu.Game.Tests.Visual.Editing
|
|||||||
AddStep("seek near end", () => EditorClock.Seek(EditorClock.TrackLength - 250));
|
AddStep("seek near end", () => EditorClock.Seek(EditorClock.TrackLength - 250));
|
||||||
AddUntilStep("clock stops", () => !EditorClock.IsRunning);
|
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());
|
AddStep("start clock again", () => EditorClock.Start());
|
||||||
AddAssert("clock looped to start", () => EditorClock.IsRunning && EditorClock.CurrentTime < 500);
|
AddAssert("clock looped to start", () => EditorClock.IsRunning && EditorClock.CurrentTime < 500);
|
||||||
|
@ -158,8 +158,6 @@ namespace osu.Game.Screens.Edit
|
|||||||
|
|
||||||
public double CurrentTime => underlyingClock.CurrentTime;
|
public double CurrentTime => underlyingClock.CurrentTime;
|
||||||
|
|
||||||
public double TotalAppliedOffset => underlyingClock.TotalAppliedOffset;
|
|
||||||
|
|
||||||
public void Reset()
|
public void Reset()
|
||||||
{
|
{
|
||||||
ClearTransforms();
|
ClearTransforms();
|
||||||
|
Loading…
Reference in New Issue
Block a user