Make tests fail

This commit is contained in:
Susko3 2023-11-06 20:43:24 +01:00
parent d6e7145e1c
commit c1967a5cbb
1 changed files with 6 additions and 2 deletions

View File

@ -133,8 +133,11 @@ public void TestStreamInputVisual()
} }
[Test] [Test]
public void TestSimpleInput() public void TestSimpleInput([Values] bool disableMouseButtons)
{ {
// OsuSetting.MouseDisableButtons should not affect touch taps
AddStep($"{(disableMouseButtons ? "disable" : "enable")} mouse buttons", () => config.SetValue(OsuSetting.MouseDisableButtons, disableMouseButtons));
beginTouch(TouchSource.Touch1); beginTouch(TouchSource.Touch1);
assertKeyCounter(1, 0); assertKeyCounter(1, 0);
@ -468,7 +471,7 @@ public void TestActionWhileDisallowed()
[Test] [Test]
public void TestInputWhileMouseButtonsDisabled() public void TestInputWhileMouseButtonsDisabled()
{ {
AddStep("Disable mouse buttons", () => config.SetValue(OsuSetting.MouseDisableButtons, true)); AddStep("Disable gameplay taps", () => config.SetValue(OsuSetting.GameplayDisableTaps, true));
beginTouch(TouchSource.Touch1); beginTouch(TouchSource.Touch1);
@ -620,6 +623,7 @@ private void releaseAllTouches()
AddStep("Release all touches", () => AddStep("Release all touches", () =>
{ {
config.SetValue(OsuSetting.MouseDisableButtons, false); config.SetValue(OsuSetting.MouseDisableButtons, false);
config.SetValue(OsuSetting.GameplayDisableTaps, false);
foreach (TouchSource source in InputManager.CurrentState.Touch.ActiveSources) foreach (TouchSource source in InputManager.CurrentState.Touch.ActiveSources)
InputManager.EndTouch(new Touch(source, osuInputManager.ScreenSpaceDrawQuad.Centre)); InputManager.EndTouch(new Touch(source, osuInputManager.ScreenSpaceDrawQuad.Centre));
}); });