mirror of
https://github.com/ppy/osu
synced 2024-12-25 16:22:23 +00:00
Add better test coverage of dual stages in skinnable tests
This commit is contained in:
parent
f70342bd67
commit
688e65475d
@ -8,6 +8,7 @@ using NUnit.Framework;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Rulesets.Mania.Beatmaps;
|
||||
using osu.Game.Rulesets.Mania.UI;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Mania.Tests.Skinning
|
||||
{
|
||||
@ -25,22 +26,35 @@ namespace osu.Game.Rulesets.Mania.Tests.Skinning
|
||||
new StageDefinition(2)
|
||||
};
|
||||
|
||||
SetContents(_ => new ManiaPlayfield(stageDefinitions));
|
||||
SetContents(_ => new ManiaInputManager(new ManiaRuleset().RulesetInfo, 2)
|
||||
{
|
||||
Child = new ManiaPlayfield(stageDefinitions)
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestDualStages()
|
||||
[TestCase(2)]
|
||||
[TestCase(3)]
|
||||
[TestCase(5)]
|
||||
public void TestDualStages(int columnCount)
|
||||
{
|
||||
AddStep("create stage", () =>
|
||||
{
|
||||
stageDefinitions = new List<StageDefinition>
|
||||
{
|
||||
new StageDefinition(2),
|
||||
new StageDefinition(2)
|
||||
new StageDefinition(columnCount),
|
||||
new StageDefinition(columnCount)
|
||||
};
|
||||
|
||||
SetContents(_ => new ManiaPlayfield(stageDefinitions));
|
||||
SetContents(_ => new ManiaInputManager(new ManiaRuleset().RulesetInfo, (int)PlayfieldType.Dual + 2 * columnCount)
|
||||
{
|
||||
Child = new ManiaPlayfield(stageDefinitions)
|
||||
{
|
||||
// bit of a hack to make sure the dual stages fit on screen without overlapping each other.
|
||||
Size = new Vector2(1.5f),
|
||||
Scale = new Vector2(1 / 1.5f)
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user