mirror of
https://github.com/ppy/osu
synced 2025-03-21 18:38:25 +00:00
Fix regressing BeatmapRecommendations
tests due to diffcalc running at
This commit is contained in:
parent
2a73210865
commit
0e1f08eff8
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
@ -166,15 +167,22 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
|
|
||||||
var beatmapSet = TestResources.CreateTestBeatmapSetInfo(rulesets.Length, rulesets);
|
var beatmapSet = TestResources.CreateTestBeatmapSetInfo(rulesets.Length, rulesets);
|
||||||
|
|
||||||
for (int i = 0; i < rulesets.Length; i++)
|
var importedBeatmapSet = Game.BeatmapManager.Import(beatmapSet);
|
||||||
|
|
||||||
|
Debug.Assert(importedBeatmapSet != null);
|
||||||
|
|
||||||
|
importedBeatmapSet.PerformWrite(s =>
|
||||||
{
|
{
|
||||||
var beatmap = beatmapSet.Beatmaps[i];
|
for (int i = 0; i < rulesets.Length; i++)
|
||||||
|
{
|
||||||
|
var beatmap = s.Beatmaps[i];
|
||||||
|
|
||||||
beatmap.StarRating = i + 1;
|
beatmap.StarRating = i + 1;
|
||||||
beatmap.DifficultyName = $"SR{i + 1}";
|
beatmap.DifficultyName = $"SR{i + 1}";
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return Game.BeatmapManager.Import(beatmapSet)?.Value;
|
return importedBeatmapSet.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool ensureAllBeatmapSetsImported(IEnumerable<BeatmapSetInfo> beatmapSets) => beatmapSets.All(set => set != null);
|
private bool ensureAllBeatmapSetsImported(IEnumerable<BeatmapSetInfo> beatmapSets) => beatmapSets.All(set => set != null);
|
||||||
|
Loading…
Reference in New Issue
Block a user