mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 19:32:55 +08:00
Add test for set preview point
This commit is contained in:
parent
c164744064
commit
984f0b5fa9
23
osu.Game.Tests/Visual/Editing/TestScenePreviewTime.cs
Normal file
23
osu.Game.Tests/Visual/Editing/TestScenePreviewTime.cs
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using NUnit.Framework;
|
||||||
|
using osu.Game.Rulesets;
|
||||||
|
using osu.Game.Rulesets.Osu;
|
||||||
|
|
||||||
|
namespace osu.Game.Tests.Visual.Editing
|
||||||
|
{
|
||||||
|
public partial class TestScenePreviewTime : EditorTestScene
|
||||||
|
{
|
||||||
|
protected override Ruleset CreateEditorRuleset() => new OsuRuleset();
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestSetPreviewTimingPoint()
|
||||||
|
{
|
||||||
|
AddStep("seek to 1000", () => EditorClock.Seek(1000));
|
||||||
|
AddAssert("time is 1000", () => EditorClock.CurrentTime == 1000);
|
||||||
|
AddStep("set current time as preview point", () => Editor.SetCurrectTimeAsPreview());
|
||||||
|
AddAssert("preview time is 1000", () => EditorBeatmap.PreviewTime.Value == 1000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -102,6 +102,8 @@ namespace osu.Game.Tests.Visual
|
|||||||
|
|
||||||
public new void Redo() => base.Redo();
|
public new void Redo() => base.Redo();
|
||||||
|
|
||||||
|
public new void SetCurrectTimeAsPreview() => base.SetCurrectTimeAsPreview();
|
||||||
|
|
||||||
public new bool Save() => base.Save();
|
public new bool Save() => base.Save();
|
||||||
|
|
||||||
public new void Cut() => base.Cut();
|
public new void Cut() => base.Cut();
|
||||||
|
Loading…
Reference in New Issue
Block a user