Skip to content

Commit

Permalink
Add relevant asserts to existing test system
Browse files Browse the repository at this point in the history
  • Loading branch information
frenzibyte committed Dec 15, 2024
1 parent 52944cd commit 1589bcd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions osu.Framework.Tests/Visual/Input/TestSceneTouchInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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", () =>
Expand All @@ -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));

Expand Down

0 comments on commit 1589bcd

Please sign in to comment.