mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Update tests and logic
This commit is contained in:
@ -41,6 +41,26 @@ namespace osu.Game.Tournament.Tests.Screens
|
||||
AddAssert("ensure layout width is 2", () => screen.ChildrenOfType<TournamentBeatmapPanel>().ElementAt(2).Y > 0);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestJustEnoughMaps()
|
||||
{
|
||||
AddStep("load just enough maps", () =>
|
||||
{
|
||||
Ladder.CurrentMatch.Value.Round.Value.Beatmaps.Clear();
|
||||
|
||||
for (int i = 0; i < 18; i++)
|
||||
addBeatmap();
|
||||
});
|
||||
|
||||
AddStep("reset match", () =>
|
||||
{
|
||||
Ladder.CurrentMatch.Value = new TournamentMatch();
|
||||
Ladder.CurrentMatch.Value = Ladder.Matches.First();
|
||||
});
|
||||
|
||||
AddAssert("ensure layout width is 2", () => screen.ChildrenOfType<TournamentBeatmapPanel>().ElementAt(2).Y > 0);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestManyMaps()
|
||||
{
|
||||
@ -48,7 +68,7 @@ namespace osu.Game.Tournament.Tests.Screens
|
||||
{
|
||||
Ladder.CurrentMatch.Value.Round.Value.Beatmaps.Clear();
|
||||
|
||||
for (int i = 0; i < 17; i++)
|
||||
for (int i = 0; i < 19; i++)
|
||||
addBeatmap();
|
||||
});
|
||||
|
||||
@ -61,6 +81,26 @@ namespace osu.Game.Tournament.Tests.Screens
|
||||
AddAssert("ensure layout width is 3", () => screen.ChildrenOfType<TournamentBeatmapPanel>().ElementAt(2).Y == 0);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestJustEnoughMods()
|
||||
{
|
||||
AddStep("load many maps", () =>
|
||||
{
|
||||
Ladder.CurrentMatch.Value.Round.Value.Beatmaps.Clear();
|
||||
|
||||
for (int i = 0; i < 11; i++)
|
||||
addBeatmap(i > 4 ? $"M{i}" : "NM");
|
||||
});
|
||||
|
||||
AddStep("reset match", () =>
|
||||
{
|
||||
Ladder.CurrentMatch.Value = new TournamentMatch();
|
||||
Ladder.CurrentMatch.Value = Ladder.Matches.First();
|
||||
});
|
||||
|
||||
AddAssert("ensure layout width is 2", () => screen.ChildrenOfType<TournamentBeatmapPanel>().ElementAt(2).Y > 0);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestManyMods()
|
||||
{
|
||||
@ -68,8 +108,8 @@ namespace osu.Game.Tournament.Tests.Screens
|
||||
{
|
||||
Ladder.CurrentMatch.Value.Round.Value.Beatmaps.Clear();
|
||||
|
||||
for (int i = 0; i < 13; i++)
|
||||
addBeatmap(i < 4 ? $"M{i}" : "NM");
|
||||
for (int i = 0; i < 12; i++)
|
||||
addBeatmap(i > 4 ? $"M{i}" : "NM");
|
||||
});
|
||||
|
||||
AddStep("reset match", () =>
|
||||
|
Reference in New Issue
Block a user