1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-13 16:13:34 +08:00

Add failing test coverage of drag after point placement

This commit is contained in:
Dean Herbert 2023-11-21 15:31:24 +09:00
parent a210469956
commit 1660eb3c15
No known key found for this signature in database

View File

@ -272,6 +272,30 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor
assertControlPointType(2, PathType.PERFECT_CURVE);
}
[Test]
public void TestSliderDrawingDoesntActivateAfterNormalPlacement()
{
Vector2 startPoint = new Vector2(200);
addMovementStep(startPoint);
addClickStep(MouseButton.Left);
for (int i = 0; i < 20; i++)
{
if (i == 5)
AddStep("press left button", () => InputManager.PressButton(MouseButton.Left));
addMovementStep(startPoint + new Vector2(i * 40, MathF.Sin(i * MathF.PI / 5) * 50));
}
AddStep("release left button", () => InputManager.ReleaseButton(MouseButton.Left));
assertPlaced(false);
addClickStep(MouseButton.Right);
assertPlaced(true);
assertControlPointType(0, PathType.BEZIER);
}
[Test]
public void TestSliderDrawingCurve()
{