mirror of
https://github.com/ppy/osu.git
synced 2025-01-30 02:13:22 +08:00
Use legible tuple member name
This commit is contained in:
parent
33b76015d8
commit
e37a3a84fd
@ -28,7 +28,7 @@ namespace osu.Game.Tests.Visual.Menus
|
|||||||
public void TestMusicNavigationActions()
|
public void TestMusicNavigationActions()
|
||||||
{
|
{
|
||||||
int importId = 0;
|
int importId = 0;
|
||||||
Queue<(WorkingBeatmap working, TrackChangeDirection dir)> trackChangeQueue = null;
|
Queue<(WorkingBeatmap working, TrackChangeDirection changeDirection)> trackChangeQueue = null;
|
||||||
|
|
||||||
// ensure we have at least two beatmaps available to identify the direction the music controller navigated to.
|
// ensure we have at least two beatmaps available to identify the direction the music controller navigated to.
|
||||||
AddRepeatStep("import beatmap", () => Game.BeatmapManager.Import(new BeatmapSetInfo
|
AddRepeatStep("import beatmap", () => Game.BeatmapManager.Import(new BeatmapSetInfo
|
||||||
@ -55,8 +55,8 @@ namespace osu.Game.Tests.Visual.Menus
|
|||||||
|
|
||||||
AddStep("bind to track change", () =>
|
AddStep("bind to track change", () =>
|
||||||
{
|
{
|
||||||
trackChangeQueue = new Queue<(WorkingBeatmap working, TrackChangeDirection dir)>();
|
trackChangeQueue = new Queue<(WorkingBeatmap, TrackChangeDirection)>();
|
||||||
Game.MusicController.TrackChanged += (working, dir) => trackChangeQueue.Enqueue((working, dir));
|
Game.MusicController.TrackChanged += (working, changeDirection) => trackChangeQueue.Enqueue((working, changeDirection));
|
||||||
});
|
});
|
||||||
|
|
||||||
AddStep("seek track to 6 second", () => Game.MusicController.SeekTo(6000));
|
AddStep("seek track to 6 second", () => Game.MusicController.SeekTo(6000));
|
||||||
@ -69,12 +69,12 @@ namespace osu.Game.Tests.Visual.Menus
|
|||||||
AddStep("trigger music prev action", () => Game.GlobalBinding.TriggerPressed(GlobalAction.MusicPrev));
|
AddStep("trigger music prev action", () => Game.GlobalBinding.TriggerPressed(GlobalAction.MusicPrev));
|
||||||
AddAssert("track changed to previous", () =>
|
AddAssert("track changed to previous", () =>
|
||||||
trackChangeQueue.Count == 1 &&
|
trackChangeQueue.Count == 1 &&
|
||||||
trackChangeQueue.Dequeue().dir == TrackChangeDirection.Prev);
|
trackChangeQueue.Dequeue().changeDirection == TrackChangeDirection.Prev);
|
||||||
|
|
||||||
AddStep("trigger music next action", () => Game.GlobalBinding.TriggerPressed(GlobalAction.MusicNext));
|
AddStep("trigger music next action", () => Game.GlobalBinding.TriggerPressed(GlobalAction.MusicNext));
|
||||||
AddAssert("track changed to next", () =>
|
AddAssert("track changed to next", () =>
|
||||||
trackChangeQueue.Count == 1 &&
|
trackChangeQueue.Count == 1 &&
|
||||||
trackChangeQueue.Dequeue().dir == TrackChangeDirection.Next);
|
trackChangeQueue.Dequeue().changeDirection == TrackChangeDirection.Next);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user