mirror of
https://github.com/ppy/osu
synced 2024-12-13 18:37:04 +00:00
Test both ways
This commit is contained in:
parent
659865b457
commit
63f6269eb0
@ -83,8 +83,9 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
waitForSelection(set_count, 3);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestTraversalHold()
|
||||
[TestCase(true)]
|
||||
[TestCase(false)]
|
||||
public void TestTraversalHold(bool forwards)
|
||||
{
|
||||
var sets = new List<BeatmapSetInfo>();
|
||||
const int create_this_many_sets = 200;
|
||||
@ -99,15 +100,16 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
|
||||
void selectNextAndAssert(int amount)
|
||||
{
|
||||
setSelected(1, 1);
|
||||
AddStep($"Next beatmap {amount} times", () =>
|
||||
setSelected(forwards ? 1 : create_this_many_sets, 1);
|
||||
string text = forwards ? "Next" : "Previous";
|
||||
AddStep($"{text} beatmap {amount} times", () =>
|
||||
{
|
||||
for (int i = 0; i < amount; i++)
|
||||
{
|
||||
carousel.SelectNext();
|
||||
carousel.SelectNext(forwards ? 1 : -1);
|
||||
}
|
||||
});
|
||||
waitForSelection(amount + 1);
|
||||
waitForSelection(forwards ? amount + 1 : create_this_many_sets - amount);
|
||||
}
|
||||
|
||||
for (int i = 1; i < create_this_many_sets; i += i)
|
||||
|
Loading…
Reference in New Issue
Block a user