mirror of https://github.com/ppy/osu
Add failing tests covering correct flip handling
This commit is contained in:
parent
29376ffcc0
commit
0940ab1e11
|
@ -133,6 +133,32 @@ public void TestRotateHotkeys()
|
|||
AddAssert("objects reverted to original position", () => addedObjects[0].Position == new Vector2(0));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestGlobalFlipHotkeys()
|
||||
{
|
||||
HitCircle addedObject = null;
|
||||
|
||||
AddStep("add hitobjects", () => EditorBeatmap.Add(addedObject = new HitCircle { StartTime = 100 }));
|
||||
|
||||
AddStep("select objects", () => EditorBeatmap.SelectedHitObjects.Add(addedObject));
|
||||
|
||||
AddStep("flip horizontally across playfield", () =>
|
||||
{
|
||||
InputManager.PressKey(Key.ControlLeft);
|
||||
InputManager.Key(Key.H);
|
||||
InputManager.ReleaseKey(Key.ControlLeft);
|
||||
});
|
||||
AddAssert("objects flipped horizontally", () => addedObject.Position == new Vector2(OsuPlayfield.BASE_SIZE.X, 0));
|
||||
|
||||
AddStep("flip vertically across playfield", () =>
|
||||
{
|
||||
InputManager.PressKey(Key.ControlLeft);
|
||||
InputManager.Key(Key.J);
|
||||
InputManager.ReleaseKey(Key.ControlLeft);
|
||||
});
|
||||
AddAssert("objects flipped vertically", () => addedObject.Position == OsuPlayfield.BASE_SIZE);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestBasicSelect()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue