@@ -110,7 +110,7 @@ private void ReleaseBindingsForActions(Keyboard keyboard, InputAction action1, I
110110 [ Test ]
111111 [ Category ( "Actions Priority" ) ]
112112 [ TestCaseSource ( nameof ( TwoInputActionTestCases ) ) ]
113- public void Actions_Priority_OnlyOneActionIsPerformed_WhenOnePriorityIsHigherThanOther ( TwoInputActionDataWrapper < InputAction , InputAction > twoInputActions )
113+ public void Actions_Priority_OnlyOneActionIsFired_WhenOnePriorityIsHigherThanOther ( TwoInputActionDataWrapper < InputAction , InputAction > twoInputActions )
114114 {
115115 InputSystem . settings . shortcutKeysConsumeInput = true ;
116116 var keyboard = InputSystem . AddDevice < Keyboard > ( ) ;
@@ -147,7 +147,7 @@ public void Actions_Priority_OnlyOneActionIsPerformed_WhenOnePriorityIsHigherTha
147147 [ Test ]
148148 [ Category ( "Actions Priority" ) ]
149149 [ TestCaseSource ( nameof ( TwoInputActionTestCases ) ) ]
150- public void Actions_Priority_OnlyOneActionIsPerformed_WhenOnePriorityIsHigherThanOtherInversePriorityOrder ( TwoInputActionDataWrapper < InputAction , InputAction > twoInputActions )
150+ public void Actions_Priority_OnlyOneActionIsFired_WhenOnePriorityIsHigherThanOtherInversePriorityOrder ( TwoInputActionDataWrapper < InputAction , InputAction > twoInputActions )
151151 {
152152 InputSystem . settings . shortcutKeysConsumeInput = true ;
153153 var keyboard = InputSystem . AddDevice < Keyboard > ( ) ;
@@ -217,7 +217,7 @@ public void Actions_Priority_BothActionsArePerformed_DueToKeyPressOrderForShortc
217217 [ Test ]
218218 [ Category ( "Actions Priority" ) ]
219219 [ TestCaseSource ( nameof ( TwoInputActionTestCases ) ) ]
220- public void Actions_Priority_FirstActionFires_WhenPriorityIsEqual ( TwoInputActionDataWrapper < InputAction , InputAction > twoInputActions ) // TODO: This shouldn't be the case. This should fire both!!
220+ public void Actions_Priority_BothActionFires_WhenPriorityIsEqual ( TwoInputActionDataWrapper < InputAction , InputAction > twoInputActions )
221221 {
222222 InputSystem . settings . shortcutKeysConsumeInput = true ;
223223 var keyboard = InputSystem . AddDevice < Keyboard > ( ) ;
@@ -233,7 +233,7 @@ public void Actions_Priority_FirstActionFires_WhenPriorityIsEqual(TwoInputAction
233233 PressBindingsForInputActions ( keyboard , action1 , action2 ) ;
234234
235235 Assert . That ( action1 . WasPerformedThisFrame ( ) , Is . True ) ;
236- Assert . That ( action2 . WasPerformedThisFrame ( ) , Is . False ) ;
236+ Assert . That ( action2 . WasPerformedThisFrame ( ) , Is . True ) ;
237237 }
238238
239239 [ Test ]
@@ -316,13 +316,6 @@ public void Actions_Priority_BothActionsWithDifferentPriorityFire_WhenThereIsNoC
316316 // Different letter keys: no conflict on the same control, so both shortcuts can perform despite different priorities.
317317 Assert . That ( action1WasPerformed , Is . True ) ;
318318 Assert . That ( action2 . WasPerformedThisFrame ( ) , Is . True ) ;
319-
320- // TODO: Darren, trigger just the bindings again to be sure the shortcut doesn't trigger for a second time
321- // Press((ButtonControl)keyboard[action1.GetBind], queueEventOnly: true);
322- // Press((ButtonControl)keyboard[action2.controls[i].name], queueEventOnly: true);
323- //
324- // Assert.That(action1.WasPerformedThisFrame(), Is.False);
325- // Assert.That(action2.WasPerformedThisFrame(), Is.False);
326319 }
327320
328321 [ Test ]
@@ -353,13 +346,6 @@ public void Actions_Priority_BothActionsWithDifferentPriorityFire_WhenThereIsNoC
353346 // Different letter keys: no conflict on the same control, so both shortcuts can perform despite different priorities.
354347 Assert . That ( action1WasPerformed , Is . True ) ;
355348 Assert . That ( action2 . WasPerformedThisFrame ( ) , Is . True ) ;
356-
357- // TODO: Darren, trigger just the bindings again to be sure the shortcut doesn't trigger for a second time
358- // Press((ButtonControl)keyboard[action1.GetBind], queueEventOnly: true);
359- // Press((ButtonControl)keyboard[action2.controls[i].name], queueEventOnly: true);
360- //
361- // Assert.That(action1.WasPerformedThisFrame(), Is.False);
362- // Assert.That(action2.WasPerformedThisFrame(), Is.False);
363349 }
364350
365351 [ Test ]
@@ -390,12 +376,5 @@ public void Actions_Priority_BothActionsWithEqualPriorityFire_WhenThereIsNoConfl
390376 // Different letter keys: no conflict on the same control, so both shortcuts can perform despite different priorities.
391377 Assert . That ( action1WasPerformed , Is . True ) ;
392378 Assert . That ( action2 . WasPerformedThisFrame ( ) , Is . True ) ;
393-
394- // TODO: Darren, trigger just the bindings again to be sure the shortcut doesn't trigger for a second time
395- // Press((ButtonControl)keyboard[action1.GetBind], queueEventOnly: true);
396- // Press((ButtonControl)keyboard[action2.controls[i].name], queueEventOnly: true);
397- //
398- // Assert.That(action1.WasPerformedThisFrame(), Is.False);
399- // Assert.That(action2.WasPerformedThisFrame(), Is.False);
400379 }
401380}
0 commit comments