Add test expectation for how positional input should be handled

This commit is contained in:
Dean Herbert 2023-01-16 21:07:19 +09:00
parent ab3d632112
commit 6b16d3ee61

View File

@ -101,6 +101,26 @@ namespace osu.Game.Rulesets.Osu.Tests
assertKeyCounter(1, 1); assertKeyCounter(1, 1);
} }
[Test]
public void TestPositionalInputUpdatesOnlyFromMostRecentTouch()
{
beginTouch(TouchSource.Touch1);
checkPosition(TouchSource.Touch1);
beginTouch(TouchSource.Touch2);
checkPosition(TouchSource.Touch2);
beginTouch(TouchSource.Touch1, Vector2.One);
checkPosition(TouchSource.Touch2);
endTouch(TouchSource.Touch2);
checkPosition(TouchSource.Touch2);
// note that touch1 was never ended, but becomes active for tracking again.
beginTouch(TouchSource.Touch1);
checkPosition(TouchSource.Touch1);
}
[Test] [Test]
public void TestSimpleInputButtonsDisabled() public void TestSimpleInputButtonsDisabled()
{ {