From 77cbe3d087007b71a2273b643d83bc4d8d0db09c Mon Sep 17 00:00:00 2001 From: kongehund <63306696+kongehund@users.noreply.github.com> Date: Tue, 10 Dec 2024 20:52:28 +0100 Subject: [PATCH] fix tests and remove extra newline --- .../Editor/TestSceneContextMenuClose.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/osu.Game.Rulesets.Osu.Tests/Editor/TestSceneContextMenuClose.cs b/osu.Game.Rulesets.Osu.Tests/Editor/TestSceneContextMenuClose.cs index 69e773b22cf9..4dfa99694ac3 100644 --- a/osu.Game.Rulesets.Osu.Tests/Editor/TestSceneContextMenuClose.cs +++ b/osu.Game.Rulesets.Osu.Tests/Editor/TestSceneContextMenuClose.cs @@ -17,7 +17,6 @@ public partial class TestSceneContextMenuClose : TestSceneOsuEditor private ContextMenuContainer contextMenuContainer => Editor.ChildrenOfType().First(); - [Test] public void TestDrawnSliderClosesMenu() { @@ -27,7 +26,7 @@ public void TestDrawnSliderClosesMenu() AddStep("move mouse to top left of playfield", () => { playfield = this.ChildrenOfType().Single(); - var location = (3 * playfield.ScreenSpaceDrawQuad.TopLeft + playfield.ScreenSpaceDrawQuad.BottomRight) / 4; + var location = (3 * playfield.ScreenSpaceDrawQuad.TopLeft + playfield.ScreenSpaceDrawQuad.BottomRight / 4); InputManager.MoveMouseTo(location); }); AddStep("place circle", () => InputManager.Click(MouseButton.Left)); @@ -35,14 +34,14 @@ public void TestDrawnSliderClosesMenu() AddUntilStep("context menu is visible", () => contextMenuContainer.ChildrenOfType().Single().State == MenuState.Open); AddStep("move mouse to bottom right of playfield", () => { - var location = (playfield.ScreenSpaceDrawQuad.TopLeft + 3 * playfield.ScreenSpaceDrawQuad.BottomRight) / 4; + var location = (playfield.ScreenSpaceDrawQuad.TopLeft + 3 * playfield.ScreenSpaceDrawQuad.BottomRight / 4); InputManager.MoveMouseTo(location); }); AddStep("select slider placement tool", () => InputManager.Key(Key.Number3)); AddStep("begin placement", () => InputManager.PressButton(MouseButton.Left)); AddStep("move mouse to top right of playfield", () => { - var location = (playfield.ScreenSpaceDrawQuad.TopRight + playfield.ScreenSpaceDrawQuad.BottomLeft) / 4; + var location = (playfield.ScreenSpaceDrawQuad.TopRight + playfield.ScreenSpaceDrawQuad.BottomLeft / 4); InputManager.MoveMouseTo(location); }); AddStep("end placement", () => InputManager.ReleaseButton(MouseButton.Left)); @@ -58,7 +57,7 @@ public void TestCircleClosesMenu() AddStep("move mouse to top left of playfield", () => { playfield = this.ChildrenOfType().Single(); - var location = (3 * playfield.ScreenSpaceDrawQuad.TopLeft + playfield.ScreenSpaceDrawQuad.BottomRight) / 4; + var location = (3 * playfield.ScreenSpaceDrawQuad.TopLeft + playfield.ScreenSpaceDrawQuad.BottomRight / 4); InputManager.MoveMouseTo(location); }); AddStep("place circle", () => InputManager.Click(MouseButton.Left)); @@ -66,7 +65,7 @@ public void TestCircleClosesMenu() AddUntilStep("context menu is visible", () => contextMenuContainer.ChildrenOfType().Single().State == MenuState.Open); AddStep("move mouse to bottom right of playfield", () => { - var location = (playfield.ScreenSpaceDrawQuad.TopLeft + 3 * playfield.ScreenSpaceDrawQuad.BottomRight) / 4; + var location = (playfield.ScreenSpaceDrawQuad.TopLeft + 3 * playfield.ScreenSpaceDrawQuad.BottomRight / 4); InputManager.MoveMouseTo(location); }); AddStep("place circle", () => InputManager.Click(MouseButton.Left));