1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 06:03:08 +08:00

Add test coverage of tracking inside lenience period but not at tick or end

This commit is contained in:
Dean Herbert 2023-09-29 17:17:04 +09:00
parent 62bcb62842
commit 22cb168c0f

View File

@ -37,6 +37,33 @@ namespace osu.Game.Rulesets.Osu.Tests
private readonly List<JudgementResult> judgementResults = new List<JudgementResult>();
[Test]
public void TestTrackingBetweenLastTickAndTail()
{
performTest(new List<ReplayFrame>
{
new OsuReplayFrame { Position = Vector2.Zero, Actions = { OsuAction.LeftButton, OsuAction.RightButton }, Time = time_slider_start },
new OsuReplayFrame { Position = new Vector2(200, 0), Actions = { OsuAction.LeftButton, OsuAction.RightButton }, Time = time_slider_start + 50 },
new OsuReplayFrame { Position = new Vector2(200, 0), Actions = { OsuAction.LeftButton, OsuAction.RightButton }, Time = time_slider_start + 480 },
new OsuReplayFrame { Position = new Vector2(0, 0), Actions = { OsuAction.LeftButton, OsuAction.RightButton }, Time = time_slider_start + 500 },
new OsuReplayFrame { Position = new Vector2(200, 0), Actions = { OsuAction.RightButton }, Time = time_slider_start + 520 },
}, new Slider
{
StartTime = time_slider_start,
Position = new Vector2(0, 0),
SliderVelocityMultiplier = 10f,
Path = new SliderPath(PathType.Linear, new[]
{
Vector2.Zero,
new Vector2(slider_path_length * 10, 0),
new Vector2(slider_path_length * 10, slider_path_length),
new Vector2(0, slider_path_length),
}),
});
AddAssert("Full judgement awarded", assertMaxJudge);
}
[Test]
public void TestTrackingAtTailButNotLastTick()
{