mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 17:23:22 +08:00
Test for path type transfer
This commit is contained in:
parent
2d94484566
commit
0af6d77192
@ -63,7 +63,7 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor
|
|||||||
|
|
||||||
assertControlPointPathType(0, PathType.Bezier);
|
assertControlPointPathType(0, PathType.Bezier);
|
||||||
assertControlPointPathType(1, PathType.PerfectCurve);
|
assertControlPointPathType(1, PathType.PerfectCurve);
|
||||||
AddAssert("point 3 is not inherited", () => slider.Path.ControlPoints[3].Type != null);
|
assertControlPointPathType(3, PathType.Bezier);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@ -105,6 +105,27 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor
|
|||||||
AddAssert("point 3 is not inherited", () => slider.Path.ControlPoints[3].Type != null);
|
AddAssert("point 3 is not inherited", () => slider.Path.ControlPoints[3].Type != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestPerfectCurveTooManyPointsLinear()
|
||||||
|
{
|
||||||
|
createVisualiser(true);
|
||||||
|
|
||||||
|
addControlPointStep(new Vector2(200), PathType.Linear);
|
||||||
|
addControlPointStep(new Vector2(300));
|
||||||
|
addControlPointStep(new Vector2(500, 300));
|
||||||
|
addControlPointStep(new Vector2(700, 200));
|
||||||
|
addControlPointStep(new Vector2(500, 100));
|
||||||
|
|
||||||
|
// Must be both hovering and selecting the control point for the context menu to work.
|
||||||
|
moveMouseToControlPoint(1);
|
||||||
|
AddStep("select control point", () => visualiser.Pieces[1].IsSelected.Value = true);
|
||||||
|
addContextMenuItemStep("Perfect curve");
|
||||||
|
|
||||||
|
assertControlPointPathType(0, PathType.Linear);
|
||||||
|
assertControlPointPathType(1, PathType.PerfectCurve);
|
||||||
|
assertControlPointPathType(3, PathType.Linear);
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestPerfectCurveChangeToBezier()
|
public void TestPerfectCurveChangeToBezier()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user