Skip to content

Commit ec59f94

Browse files
committed
Add test for unbound input.
1 parent 00520d5 commit ec59f94

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/BizHawk.Tests.Client.Common/InputManagerTests.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,5 +500,20 @@ public void InputIsNotSeenAsUnbound()
500500
source.AddInputEvent(MakePressEvent("Q"));
501501
manager.ProcessInput(source, context.processHotkey, context.config, (_) => Assert.Fail("Bound key was seen as unbound."));
502502
}
503+
504+
[TestMethod]
505+
public void UnboundInputIsSeen()
506+
{
507+
Context context = MakeContext();
508+
InputManager manager = context.manager;
509+
FakeInputSource source = context.source;
510+
511+
source.AddInputEvent(MakePressEvent("A"));
512+
513+
bool sawUnboundInput = false;
514+
manager.ProcessInput(source, context.processHotkey, context.config, (_) => sawUnboundInput = true);
515+
516+
Assert.IsTrue(sawUnboundInput);
517+
}
503518
}
504519
}

0 commit comments

Comments
 (0)