mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
Test both ways
This commit is contained in:
@ -83,8 +83,9 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
waitForSelection(set_count, 3);
|
waitForSelection(set_count, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[TestCase(true)]
|
||||||
public void TestTraversalHold()
|
[TestCase(false)]
|
||||||
|
public void TestTraversalHold(bool forwards)
|
||||||
{
|
{
|
||||||
var sets = new List<BeatmapSetInfo>();
|
var sets = new List<BeatmapSetInfo>();
|
||||||
const int create_this_many_sets = 200;
|
const int create_this_many_sets = 200;
|
||||||
@ -99,15 +100,16 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
|
|
||||||
void selectNextAndAssert(int amount)
|
void selectNextAndAssert(int amount)
|
||||||
{
|
{
|
||||||
setSelected(1, 1);
|
setSelected(forwards ? 1 : create_this_many_sets, 1);
|
||||||
AddStep($"Next beatmap {amount} times", () =>
|
string text = forwards ? "Next" : "Previous";
|
||||||
|
AddStep($"{text} beatmap {amount} times", () =>
|
||||||
{
|
{
|
||||||
for (int i = 0; i < amount; i++)
|
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)
|
for (int i = 1; i < create_this_many_sets; i += i)
|
||||||
|
Reference in New Issue
Block a user