mirror of
https://github.com/ppy/osu.git
synced 2025-02-05 02:43:16 +08: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.Beatmaps;
|
||||||
using osu.Game.Rulesets.Mania.Beatmaps;
|
using osu.Game.Rulesets.Mania.Beatmaps;
|
||||||
using osu.Game.Rulesets.Mania.UI;
|
using osu.Game.Rulesets.Mania.UI;
|
||||||
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Mania.Tests.Skinning
|
namespace osu.Game.Rulesets.Mania.Tests.Skinning
|
||||||
{
|
{
|
||||||
@ -25,22 +26,35 @@ namespace osu.Game.Rulesets.Mania.Tests.Skinning
|
|||||||
new StageDefinition(2)
|
new StageDefinition(2)
|
||||||
};
|
};
|
||||||
|
|
||||||
SetContents(_ => new ManiaPlayfield(stageDefinitions));
|
SetContents(_ => new ManiaInputManager(new ManiaRuleset().RulesetInfo, 2)
|
||||||
|
{
|
||||||
|
Child = new ManiaPlayfield(stageDefinitions)
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[TestCase(2)]
|
||||||
public void TestDualStages()
|
[TestCase(3)]
|
||||||
|
[TestCase(5)]
|
||||||
|
public void TestDualStages(int columnCount)
|
||||||
{
|
{
|
||||||
AddStep("create stage", () =>
|
AddStep("create stage", () =>
|
||||||
{
|
{
|
||||||
stageDefinitions = new List<StageDefinition>
|
stageDefinitions = new List<StageDefinition>
|
||||||
{
|
{
|
||||||
new StageDefinition(2),
|
new StageDefinition(columnCount),
|
||||||
new StageDefinition(2)
|
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