mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 08:27:49 +08:00
Support beatmap conversion tests with mods
This commit is contained in:
parent
0108700793
commit
ed4dda1936
@ -22,7 +22,7 @@ namespace osu.Game.Rulesets.Catch.Tests
|
|||||||
[TestCase("spinner")]
|
[TestCase("spinner")]
|
||||||
[TestCase("spinner-and-circles")]
|
[TestCase("spinner-and-circles")]
|
||||||
[TestCase("slider")]
|
[TestCase("slider")]
|
||||||
public new void Test(string name)
|
public void Test(string name)
|
||||||
{
|
{
|
||||||
base.Test(name);
|
base.Test(name);
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Rulesets.Mania.Tests
|
|||||||
protected override string ResourceAssembly => "osu.Game.Rulesets.Mania";
|
protected override string ResourceAssembly => "osu.Game.Rulesets.Mania";
|
||||||
|
|
||||||
[TestCase("basic")]
|
[TestCase("basic")]
|
||||||
public new void Test(string name)
|
public void Test(string name)
|
||||||
{
|
{
|
||||||
base.Test(name);
|
base.Test(name);
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
[TestCase("basic")]
|
[TestCase("basic")]
|
||||||
[TestCase("colinear-perfect-curve")]
|
[TestCase("colinear-perfect-curve")]
|
||||||
[TestCase("slider-ticks")]
|
[TestCase("slider-ticks")]
|
||||||
public new void Test(string name)
|
public void Test(string name)
|
||||||
{
|
{
|
||||||
base.Test(name);
|
base.Test(name);
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
|||||||
[NonParallelizable]
|
[NonParallelizable]
|
||||||
[TestCase("basic")]
|
[TestCase("basic")]
|
||||||
[TestCase("slider-generating-drumroll")]
|
[TestCase("slider-generating-drumroll")]
|
||||||
public new void Test(string name)
|
public void Test(string name)
|
||||||
{
|
{
|
||||||
base.Test(name);
|
base.Test(name);
|
||||||
}
|
}
|
||||||
|
@ -28,9 +28,9 @@ namespace osu.Game.Tests.Beatmaps
|
|||||||
|
|
||||||
protected abstract string ResourceAssembly { get; }
|
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);
|
var expectedResult = read(name);
|
||||||
|
|
||||||
Assert.Multiple(() =>
|
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);
|
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
|
return new ConvertResult
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user