1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 20:05:29 +08:00

Add more flexibility to test

This commit is contained in:
Dean Herbert 2022-09-22 15:45:30 +09:00
parent 26d98323ff
commit 1ed4b9c11c

View File

@ -32,11 +32,17 @@ namespace osu.Game.Tests.Visual.Gameplay
public TestSceneColourHitErrorMeter() public TestSceneColourHitErrorMeter()
{ {
AddSliderStep("Manual spacing test", 0, 10, 2, spacing => AddSliderStep("Judgement spacing", 0, 10, 2, spacing =>
{ {
if (colourHitErrorMeter.IsNotNull()) if (colourHitErrorMeter.IsNotNull())
colourHitErrorMeter.JudgementSpacing.Value = spacing; colourHitErrorMeter.JudgementSpacing.Value = spacing;
}); });
AddSliderStep("Judgement count", 1, 50, 5, spacing =>
{
if (colourHitErrorMeter.IsNotNull())
colourHitErrorMeter.JudgementCount.Value = spacing;
});
} }
[SetUpSteps] [SetUpSteps]
@ -91,6 +97,7 @@ namespace osu.Game.Tests.Visual.Gameplay
AddRepeatStep("Add judgement", applyOneJudgement, 8); AddRepeatStep("Add judgement", applyOneJudgement, 8);
AddStep("Change shape square", () => colourHitErrorMeter.JudgementShape.Value = ColourHitErrorMeter.ShapeStyle.Square); AddStep("Change shape square", () => colourHitErrorMeter.JudgementShape.Value = ColourHitErrorMeter.ShapeStyle.Square);
AddRepeatStep("Add judgement", applyOneJudgement, 10); AddRepeatStep("Add judgement", applyOneJudgement, 10);
AddStep("Change shape circle", () => colourHitErrorMeter.JudgementShape.Value = ColourHitErrorMeter.ShapeStyle.Circle);
} }
private void applyOneJudgement() private void applyOneJudgement()