mirror of
https://github.com/ppy/osu.git
synced 2025-02-02 06:43:22 +08:00
Fix tests
This commit is contained in:
parent
f3617eadad
commit
6100f5269d
@ -82,6 +82,7 @@ namespace osu.Game.Rulesets.Catch.Tests.Editor
|
|||||||
|
|
||||||
AddMouseMoveStep(-100, 100);
|
AddMouseMoveStep(-100, 100);
|
||||||
addVertexCheckStep(3, 1, times[0], positions[0]);
|
addVertexCheckStep(3, 1, times[0], positions[0]);
|
||||||
|
addDragEndStep();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@ -100,6 +101,9 @@ namespace osu.Game.Rulesets.Catch.Tests.Editor
|
|||||||
AddMouseMoveStep(times[2] - 50, positions[2] - 50);
|
AddMouseMoveStep(times[2] - 50, positions[2] - 50);
|
||||||
addVertexCheckStep(4, 1, times[1] - 50, positions[1] - 50);
|
addVertexCheckStep(4, 1, times[1] - 50, positions[1] - 50);
|
||||||
addVertexCheckStep(4, 2, times[2] - 50, positions[2] - 50);
|
addVertexCheckStep(4, 2, times[2] - 50, positions[2] - 50);
|
||||||
|
|
||||||
|
AddStep("release control", () => InputManager.ReleaseKey(Key.ControlLeft));
|
||||||
|
addDragEndStep();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@ -113,6 +117,7 @@ namespace osu.Game.Rulesets.Catch.Tests.Editor
|
|||||||
addDragStartStep(times[1], positions[1]);
|
addDragStartStep(times[1], positions[1]);
|
||||||
AddMouseMoveStep(times[1], 400);
|
AddMouseMoveStep(times[1], 400);
|
||||||
AddAssert("slider velocity changed", () => !hitObject.SliderVelocityMultiplierBindable.IsDefault);
|
AddAssert("slider velocity changed", () => !hitObject.SliderVelocityMultiplierBindable.IsDefault);
|
||||||
|
addDragEndStep();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@ -129,6 +134,7 @@ namespace osu.Game.Rulesets.Catch.Tests.Editor
|
|||||||
AddStep("scroll playfield", () => manualClock.CurrentTime += 200);
|
AddStep("scroll playfield", () => manualClock.CurrentTime += 200);
|
||||||
AddMouseMoveStep(times[1] + 200, positions[1] + 100);
|
AddMouseMoveStep(times[1] + 200, positions[1] + 100);
|
||||||
addVertexCheckStep(2, 1, times[1] + 200, positions[1] + 100);
|
addVertexCheckStep(2, 1, times[1] + 200, positions[1] + 100);
|
||||||
|
addDragEndStep();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@ -158,21 +164,21 @@ namespace osu.Game.Rulesets.Catch.Tests.Editor
|
|||||||
float[] positions = { 200, 200 };
|
float[] positions = { 200, 200 };
|
||||||
addBlueprintStep(times, positions, 0.2);
|
addBlueprintStep(times, positions, 0.2);
|
||||||
|
|
||||||
addAddVertexSteps(500, 180);
|
addAddVertexSteps(500, 150);
|
||||||
addVertexCheckStep(3, 1, 500, 180);
|
addVertexCheckStep(3, 1, 500, 150);
|
||||||
|
|
||||||
addAddVertexSteps(90, 200);
|
addAddVertexSteps(160, 200);
|
||||||
addVertexCheckStep(4, 1, times[0], positions[0]);
|
addVertexCheckStep(4, 1, 160, 200);
|
||||||
|
|
||||||
addAddVertexSteps(750, 200);
|
addAddVertexSteps(750, 180);
|
||||||
addVertexCheckStep(5, 4, 750, 200);
|
addVertexCheckStep(5, 4, 800, 160);
|
||||||
AddAssert("duration is changed", () => Precision.AlmostEquals(hitObject.Duration, 800 - times[0], 1e-3));
|
AddAssert("duration is changed", () => Precision.AlmostEquals(hitObject.Duration, 800 - times[0], 1e-3));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestDeleteVertex()
|
public void TestDeleteVertex()
|
||||||
{
|
{
|
||||||
double[] times = { 100, 300, 500 };
|
double[] times = { 100, 300, 400 };
|
||||||
float[] positions = { 100, 200, 150 };
|
float[] positions = { 100, 200, 150 };
|
||||||
addBlueprintStep(times, positions);
|
addBlueprintStep(times, positions);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user