mirror of
https://github.com/ppy/osu.git
synced 2026-06-04 10:24:05 +08:00
Add all beatmaps in one go in tests to avoid hundreds of callbacks
Just makes debugging easier.
This commit is contained in:
@@ -334,8 +334,12 @@ namespace osu.Game.Tests.Visual.SongSelectV2
|
||||
/// <param name="randomMetadata">Whether to randomise the metadata to make groupings more uniform.</param>
|
||||
protected void AddBeatmaps(int count, int? fixedDifficultiesPerSet = null, bool randomMetadata = false) => AddStep($"add {count} beatmaps{(randomMetadata ? " with random data" : "")}", () =>
|
||||
{
|
||||
var beatmaps = new List<BeatmapSetInfo>();
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
BeatmapSets.Add(CreateTestBeatmapSetInfo(fixedDifficultiesPerSet, randomMetadata));
|
||||
beatmaps.Add(CreateTestBeatmapSetInfo(fixedDifficultiesPerSet, randomMetadata));
|
||||
|
||||
BeatmapSets.AddRange(beatmaps);
|
||||
});
|
||||
|
||||
protected static BeatmapSetInfo CreateTestBeatmapSetInfo(int? fixedDifficultiesPerSet, bool randomMetadata)
|
||||
|
||||
Reference in New Issue
Block a user