mirror of
https://github.com/ppy/osu.git
synced 2025-01-08 05:52:54 +08:00
Add test coverage of spinner with no bonus ticks
This commit is contained in:
parent
aa6f14b024
commit
86cf0a36cf
@ -37,6 +37,12 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
AddSliderStep("Spin rate", 0.5, 5, 1, val => spinRate.Value = val);
|
AddSliderStep("Spin rate", 0.5, 5, 1, val => spinRate.Value = val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[SetUpSteps]
|
||||||
|
public void SetUpSteps()
|
||||||
|
{
|
||||||
|
AddStep("Reset rate", () => spinRate.Value = 1);
|
||||||
|
}
|
||||||
|
|
||||||
[TestCase(true)]
|
[TestCase(true)]
|
||||||
[TestCase(false)]
|
[TestCase(false)]
|
||||||
public void TestVariousSpinners(bool autoplay)
|
public void TestVariousSpinners(bool autoplay)
|
||||||
@ -47,6 +53,36 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
AddStep($"{term} Small", () => SetContents(_ => testSingle(7, autoplay)));
|
AddStep($"{term} Small", () => SetContents(_ => testSingle(7, autoplay)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestSpinnerNoBonus()
|
||||||
|
{
|
||||||
|
AddStep("Set high spin rate", () => spinRate.Value = 5);
|
||||||
|
|
||||||
|
Spinner spinner;
|
||||||
|
|
||||||
|
AddStep("add spinner", () => SetContents(_ =>
|
||||||
|
{
|
||||||
|
spinner = new Spinner
|
||||||
|
{
|
||||||
|
StartTime = Time.Current,
|
||||||
|
EndTime = Time.Current + 750,
|
||||||
|
Samples = new List<HitSampleInfo>
|
||||||
|
{
|
||||||
|
new HitSampleInfo(HitSampleInfo.HIT_NORMAL)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
spinner.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty { OverallDifficulty = 0 });
|
||||||
|
|
||||||
|
return drawableSpinner = new TestDrawableSpinner(spinner, true, spinRate)
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Depth = depthIndex++,
|
||||||
|
Scale = new Vector2(0.75f)
|
||||||
|
};
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestSpinningSamplePitchShift()
|
public void TestSpinningSamplePitchShift()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user