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

Add complete arc test

Ensures we can still make smaller circles properly.
This commit is contained in:
Naxess 2021-03-24 17:24:33 +01:00
parent b4dc35f66b
commit 0f4314c1d8

View File

@ -376,6 +376,23 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor
assertControlPointType(0, PathType.Bezier);
}
[Test]
public void TestPlacePerfectCurveSegmentCompleteArc()
{
addMovementStep(new Vector2(400));
addClickStep(MouseButton.Left);
addMovementStep(new Vector2(600, 400));
addClickStep(MouseButton.Left);
addMovementStep(new Vector2(400, 410));
addClickStep(MouseButton.Right);
assertPlaced(true);
assertControlPointCount(3);
assertControlPointType(0, PathType.PerfectCurve);
}
private void addMovementStep(Vector2 position) => AddStep($"move mouse to {position}", () => InputManager.MoveMouseTo(InputManager.ToScreenSpace(position)));
private void addClickStep(MouseButton button)