1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +08:00

Add test case covering stacks not shaking

This commit is contained in:
Bartłomiej Dach 2023-08-22 20:34:36 +02:00
parent 9ffc6cdd61
commit 48b3f7dced
No known key found for this signature in database

View File

@ -458,6 +458,26 @@ namespace osu.Game.Rulesets.Osu.Tests
addClickActionAssert(1, ClickAction.Hit);
}
[Test]
public void TestStacksDoNotShake()
{
const double time_stack_start = 1000;
Vector2 position = new Vector2(80);
var hitObjects = Enumerable.Range(0, 20).Select(i => new HitCircle
{
StartTime = time_stack_start + i * 100,
Position = position
}).Cast<OsuHitObject>().ToList();
performTest(hitObjects, new List<ReplayFrame>
{
new OsuReplayFrame { Time = time_stack_start - 450, Position = new Vector2(55), Actions = { OsuAction.LeftButton } },
});
addClickActionAssert(0, ClickAction.Ignore);
}
private void addJudgementAssert(OsuHitObject hitObject, HitResult result)
{
AddAssert($"({hitObject.GetType().ReadableName()} @ {hitObject.StartTime}) judgement is {result}",