mirror of https://github.com/ppy/osu
Make tests fail
This commit is contained in:
parent
d6e7145e1c
commit
c1967a5cbb
|
@ -133,8 +133,11 @@ public void TestStreamInputVisual()
|
|||
}
|
||||
|
||||
[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);
|
||||
|
||||
assertKeyCounter(1, 0);
|
||||
|
@ -468,7 +471,7 @@ public void TestActionWhileDisallowed()
|
|||
[Test]
|
||||
public void TestInputWhileMouseButtonsDisabled()
|
||||
{
|
||||
AddStep("Disable mouse buttons", () => config.SetValue(OsuSetting.MouseDisableButtons, true));
|
||||
AddStep("Disable gameplay taps", () => config.SetValue(OsuSetting.GameplayDisableTaps, true));
|
||||
|
||||
beginTouch(TouchSource.Touch1);
|
||||
|
||||
|
@ -620,6 +623,7 @@ private void releaseAllTouches()
|
|||
AddStep("Release all touches", () =>
|
||||
{
|
||||
config.SetValue(OsuSetting.MouseDisableButtons, false);
|
||||
config.SetValue(OsuSetting.GameplayDisableTaps, false);
|
||||
foreach (TouchSource source in InputManager.CurrentState.Touch.ActiveSources)
|
||||
InputManager.EndTouch(new Touch(source, osuInputManager.ScreenSpaceDrawQuad.Centre));
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue