Add the playable beatmap as check argument

This is different from the working beatmap's `.Beatmap` property in that it is mutated by the ruleset/editor.

So hit objects, for example, are actually of type `Slider` and such instead of the legacy `ConvertSlider`.

This should be preferred over `workingBeatmap.Beatmap`.
This commit is contained in:
Naxess
2021-04-20 01:31:51 +02:00
parent 9a69ca34a6
commit 8656176ab8
11 changed files with 36 additions and 29 deletions

View File

@ -224,12 +224,12 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor.Checks
private void assertOk(IBeatmap beatmap)
{
Assert.That(check.Run(new TestWorkingBeatmap(beatmap)), Is.Empty);
Assert.That(check.Run(beatmap, new TestWorkingBeatmap(beatmap)), Is.Empty);
}
private void assertOffscreenCircle(IBeatmap beatmap)
{
var issues = check.Run(new TestWorkingBeatmap(beatmap)).ToList();
var issues = check.Run(beatmap, new TestWorkingBeatmap(beatmap)).ToList();
Assert.That(issues, Has.Count.EqualTo(1));
Assert.That(issues.Single().Template is CheckOffscreenObjects.IssueTemplateOffscreenCircle);
@ -237,7 +237,7 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor.Checks
private void assertOffscreenSlider(IBeatmap beatmap)
{
var issues = check.Run(new TestWorkingBeatmap(beatmap)).ToList();
var issues = check.Run(beatmap, new TestWorkingBeatmap(beatmap)).ToList();
Assert.That(issues, Has.Count.EqualTo(1));
Assert.That(issues.Single().Template is CheckOffscreenObjects.IssueTemplateOffscreenSlider);