From 1589bcd6b2a9769dcc3f77e50534aecd1c232f67 Mon Sep 17 00:00:00 2001 From: Salman Alshamrani Date: Sun, 15 Dec 2024 10:48:06 -0500 Subject: [PATCH] Add relevant asserts to existing test system --- osu.Framework.Tests/Visual/Input/TestSceneTouchInput.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/osu.Framework.Tests/Visual/Input/TestSceneTouchInput.cs b/osu.Framework.Tests/Visual/Input/TestSceneTouchInput.cs index bcd61179c7..9fd6582302 100644 --- a/osu.Framework.Tests/Visual/Input/TestSceneTouchInput.cs +++ b/osu.Framework.Tests/Visual/Input/TestSceneTouchInput.cs @@ -277,6 +277,7 @@ public void TestMouseInputAppliedFromLatestTouch() { AddStep($"deactivate {s}", () => InputManager.EndTouch(new Touch(s, getTouchUpPos(s)))); AddAssert("no mouse event received", () => receptors[(int)s].MouseEvents.Count == 0); + AddAssert("mouse is still valid", () => InputManager.CurrentState.Mouse.IsPositionValid); } AddStep("deactivate last", () => @@ -297,6 +298,7 @@ public void TestMouseInputAppliedFromLatestTouch() return firstReceptor.MouseEvents.Count == 0; }); + AddAssert("mouse is invalidated", () => !InputManager.CurrentState.Mouse.IsPositionValid); AddAssert("all events dequeued", () => receptors.All(r => r.MouseEvents.Count == 0));