mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 07:42:57 +08:00
Update large arc tests
Should now be more robust and readable.
This commit is contained in:
parent
415797aadd
commit
b4dc35f66b
@ -112,10 +112,10 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor
|
||||
addMovementStep(new Vector2(350, 0));
|
||||
assertControlPointType(2, PathType.Bezier);
|
||||
|
||||
addMovementStep(new Vector2(400, 50));
|
||||
addMovementStep(new Vector2(150, 150));
|
||||
AddStep("release", () => InputManager.ReleaseButton(MouseButton.Left));
|
||||
|
||||
assertControlPointPosition(4, new Vector2(400, 50));
|
||||
assertControlPointPosition(4, new Vector2(150, 150));
|
||||
assertControlPointType(2, PathType.PerfectCurve);
|
||||
}
|
||||
|
||||
|
@ -337,13 +337,17 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor
|
||||
[Test]
|
||||
public void TestPlacePerfectCurveSegmentLarge()
|
||||
{
|
||||
addMovementStep(new Vector2(200));
|
||||
Vector2 startPosition = new Vector2(400);
|
||||
|
||||
addMovementStep(startPosition);
|
||||
addClickStep(MouseButton.Left);
|
||||
|
||||
addMovementStep(new Vector2(200, 800));
|
||||
addMovementStep(startPosition + new Vector2(240, 240));
|
||||
addClickStep(MouseButton.Left);
|
||||
|
||||
addMovementStep(new Vector2(600, 200));
|
||||
// Playfield dimensions are 640 x 480.
|
||||
// So a 480 * 480 bounding box area should be ok.
|
||||
addMovementStep(startPosition + new Vector2(-240, 240));
|
||||
addClickStep(MouseButton.Right);
|
||||
|
||||
assertPlaced(true);
|
||||
@ -354,13 +358,17 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor
|
||||
[Test]
|
||||
public void TestPlacePerfectCurveSegmentTooLarge()
|
||||
{
|
||||
addMovementStep(new Vector2(200));
|
||||
Vector2 startPosition = new Vector2(480, 200);
|
||||
|
||||
addMovementStep(startPosition);
|
||||
addClickStep(MouseButton.Left);
|
||||
|
||||
addMovementStep(new Vector2(200, 800));
|
||||
addMovementStep(startPosition + new Vector2(400, 400));
|
||||
addClickStep(MouseButton.Left);
|
||||
|
||||
addMovementStep(new Vector2(400, 200));
|
||||
// Playfield dimensions are 640 x 480.
|
||||
// So an 800 * 800 bounding box area should not be ok.
|
||||
addMovementStep(startPosition + new Vector2(-400, 400));
|
||||
addClickStep(MouseButton.Right);
|
||||
|
||||
assertPlaced(true);
|
||||
|
Loading…
Reference in New Issue
Block a user