mirror of
https://github.com/ppy/osu
synced 2025-01-10 16:19:47 +00:00
Support mods for beatmap conversion tests (#5556)
Support mods for beatmap conversion tests Co-authored-by: Dean Herbert <pe@ppy.sh>
This commit is contained in:
commit
73c48811bd
@ -22,10 +22,7 @@ namespace osu.Game.Rulesets.Catch.Tests
|
||||
[TestCase("spinner")]
|
||||
[TestCase("spinner-and-circles")]
|
||||
[TestCase("slider")]
|
||||
public new void Test(string name)
|
||||
{
|
||||
base.Test(name);
|
||||
}
|
||||
public void Test(string name) => base.Test(name);
|
||||
|
||||
protected override IEnumerable<ConvertValue> CreateConvertValue(HitObject hitObject)
|
||||
{
|
||||
|
@ -20,10 +20,7 @@ namespace osu.Game.Rulesets.Mania.Tests
|
||||
protected override string ResourceAssembly => "osu.Game.Rulesets.Mania";
|
||||
|
||||
[TestCase("basic")]
|
||||
public new void Test(string name)
|
||||
{
|
||||
base.Test(name);
|
||||
}
|
||||
public void Test(string name) => base.Test(name);
|
||||
|
||||
protected override IEnumerable<ConvertValue> CreateConvertValue(HitObject hitObject)
|
||||
{
|
||||
|
@ -23,10 +23,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
[TestCase("slider-ticks")]
|
||||
[TestCase("repeat-slider")]
|
||||
[TestCase("uneven-repeat-slider")]
|
||||
public new void Test(string name)
|
||||
{
|
||||
base.Test(name);
|
||||
}
|
||||
public void Test(string name) => base.Test(name);
|
||||
|
||||
protected override IEnumerable<ConvertValue> CreateConvertValue(HitObject hitObject)
|
||||
{
|
||||
|
@ -20,10 +20,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
||||
[NonParallelizable]
|
||||
[TestCase("basic")]
|
||||
[TestCase("slider-generating-drumroll")]
|
||||
public new void Test(string name)
|
||||
{
|
||||
base.Test(name);
|
||||
}
|
||||
public void Test(string name) => base.Test(name);
|
||||
|
||||
protected override IEnumerable<ConvertValue> CreateConvertValue(HitObject hitObject)
|
||||
{
|
||||
|
@ -28,9 +28,9 @@ namespace osu.Game.Tests.Beatmaps
|
||||
|
||||
protected abstract string ResourceAssembly { get; }
|
||||
|
||||
protected void Test(string name)
|
||||
protected void Test(string name, params Type[] mods)
|
||||
{
|
||||
var ourResult = convert(name);
|
||||
var ourResult = convert(name, mods.Select(m => (Mod)Activator.CreateInstance(m)).ToArray());
|
||||
var expectedResult = read(name);
|
||||
|
||||
Assert.Multiple(() =>
|
||||
@ -92,7 +92,7 @@ namespace osu.Game.Tests.Beatmaps
|
||||
});
|
||||
}
|
||||
|
||||
private ConvertResult convert(string name)
|
||||
private ConvertResult convert(string name, Mod[] mods)
|
||||
{
|
||||
var beatmap = getBeatmap(name);
|
||||
|
||||
@ -110,7 +110,7 @@ namespace osu.Game.Tests.Beatmaps
|
||||
}
|
||||
};
|
||||
|
||||
working.GetPlayableBeatmap(rulesetInstance.RulesetInfo, Array.Empty<Mod>());
|
||||
working.GetPlayableBeatmap(rulesetInstance.RulesetInfo, mods);
|
||||
|
||||
return new ConvertResult
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user