mirror of
https://github.com/ppy/osu.git
synced 2025-02-10 23:23:05 +08:00
Add failing test coverage of drag after point placement
This commit is contained in:
parent
a210469956
commit
1660eb3c15
@ -272,6 +272,30 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor
|
|||||||
assertControlPointType(2, PathType.PERFECT_CURVE);
|
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]
|
[Test]
|
||||||
public void TestSliderDrawingCurve()
|
public void TestSliderDrawingCurve()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user