From 054544818c5275f255748cfccca6af3eedbf8a50 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 12 Jun 2025 19:13:15 +0900 Subject: [PATCH] Add all beatmaps in one go in tests to avoid hundreds of callbacks Just makes debugging easier. --- .../Visual/SongSelectV2/BeatmapCarouselTestScene.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/osu.Game.Tests/Visual/SongSelectV2/BeatmapCarouselTestScene.cs b/osu.Game.Tests/Visual/SongSelectV2/BeatmapCarouselTestScene.cs index 8779d66b9f..36b755a071 100644 --- a/osu.Game.Tests/Visual/SongSelectV2/BeatmapCarouselTestScene.cs +++ b/osu.Game.Tests/Visual/SongSelectV2/BeatmapCarouselTestScene.cs @@ -334,8 +334,12 @@ namespace osu.Game.Tests.Visual.SongSelectV2 /// Whether to randomise the metadata to make groupings more uniform. protected void AddBeatmaps(int count, int? fixedDifficultiesPerSet = null, bool randomMetadata = false) => AddStep($"add {count} beatmaps{(randomMetadata ? " with random data" : "")}", () => { + var beatmaps = new List(); + 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)