mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 13:33:52 +08:00
Add test coverage of new traversal keys
This commit is contained in:
parent
c4871ebcf4
commit
a346456daf
@ -28,6 +28,51 @@ namespace osu.Game.Tests.Visual.Editing
|
||||
return beatmap;
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestSeekToFirst()
|
||||
{
|
||||
pressAndCheckTime(Key.Z, 2170);
|
||||
pressAndCheckTime(Key.Z, 0);
|
||||
pressAndCheckTime(Key.Z, 2170);
|
||||
|
||||
AddAssert("track not running", () => !EditorClock.IsRunning);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRestart()
|
||||
{
|
||||
pressAndCheckTime(Key.V, 227170);
|
||||
|
||||
AddAssert("track not running", () => !EditorClock.IsRunning);
|
||||
|
||||
AddStep("press X", () => InputManager.Key(Key.X));
|
||||
|
||||
AddAssert("track running", () => EditorClock.IsRunning);
|
||||
AddAssert("time restarted", () => EditorClock.CurrentTime < 100000);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestPauseResume()
|
||||
{
|
||||
AddAssert("track not running", () => !EditorClock.IsRunning);
|
||||
|
||||
AddStep("press C", () => InputManager.Key(Key.C));
|
||||
AddAssert("track running", () => EditorClock.IsRunning);
|
||||
|
||||
AddStep("press C", () => InputManager.Key(Key.C));
|
||||
AddAssert("track not running", () => !EditorClock.IsRunning);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestSeekToLast()
|
||||
{
|
||||
pressAndCheckTime(Key.V, 227170);
|
||||
pressAndCheckTime(Key.V, 229170);
|
||||
pressAndCheckTime(Key.V, 227170);
|
||||
|
||||
AddAssert("track not running", () => !EditorClock.IsRunning);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestSnappedSeeking()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user