Add change to Bezier test

This commit is contained in:
Naxess 2021-04-08 12:32:45 +02:00
parent 4110d1675d
commit 7d2b54ca42

View File

@ -105,6 +105,26 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor
AddAssert("point 3 is not inherited", () => slider.Path.ControlPoints[3].Type != null);
}
[Test]
public void TestPerfectCurveChangeToBezier()
{
createVisualiser(true);
addControlPointStep(new Vector2(200), PathType.Bezier);
addControlPointStep(new Vector2(300), PathType.PerfectCurve);
addControlPointStep(new Vector2(500, 300));
addControlPointStep(new Vector2(700, 200), PathType.Bezier);
addControlPointStep(new Vector2(500, 100));
moveMouseToControlPoint(3);
AddStep("select control point", () => visualiser.Pieces[3].IsSelected.Value = true);
addContextMenuItemStep("Inherit");
assertControlPointPathType(0, PathType.Bezier);
assertControlPointPathType(1, PathType.Bezier);
assertControlPointPathType(3, null);
}
private void createVisualiser(bool allowSelection) => AddStep("create visualiser", () => Child = visualiser = new PathControlPointVisualiser(slider, allowSelection)
{
Anchor = Anchor.Centre,