@@ -112,10 +112,8 @@ private void ReleaseBindingsForActions(Keyboard keyboard, InputAction action1, I
112112 [ TestCaseSource ( nameof ( TwoInputActionTestCases ) ) ]
113113 public void Actions_Priority_OnlyOneActionIsFired_WhenOnePriorityIsHigherThanOther ( TwoInputActionDataWrapper < InputAction , InputAction > twoInputActions )
114114 {
115- InputSystem . settings . shortcutKeysConsumeInput = true ;
116115 var keyboard = InputSystem . AddDevice < Keyboard > ( ) ;
117116
118- //var map = new InputActionMap("map");
119117 var action1 = twoInputActions . Action1 ;
120118 var action2 = twoInputActions . Action2 ;
121119
@@ -137,9 +135,6 @@ public void Actions_Priority_OnlyOneActionIsFired_WhenOnePriorityIsHigherThanOth
137135 // Cleanup key presses
138136 ReleaseBindingsForActions ( keyboard , action1 , action2 ) ;
139137
140- // Update again to be sure released is true.
141- InputSystem . Update ( ) ;
142-
143138 Assert . That ( action1 . WasPerformedThisFrame ( ) , Is . False ) ;
144139 Assert . That ( action2 . WasPerformedThisFrame ( ) , Is . False ) ;
145140 }
@@ -149,7 +144,6 @@ public void Actions_Priority_OnlyOneActionIsFired_WhenOnePriorityIsHigherThanOth
149144 [ TestCaseSource ( nameof ( TwoInputActionTestCases ) ) ]
150145 public void Actions_Priority_OnlyOneActionIsFired_WhenOnePriorityIsHigherThanOtherInversePriorityOrder ( TwoInputActionDataWrapper < InputAction , InputAction > twoInputActions )
151146 {
152- InputSystem . settings . shortcutKeysConsumeInput = true ;
153147 var keyboard = InputSystem . AddDevice < Keyboard > ( ) ;
154148
155149 var action1 = twoInputActions . Action1 ;
@@ -166,10 +160,11 @@ public void Actions_Priority_OnlyOneActionIsFired_WhenOnePriorityIsHigherThanOth
166160
167161 PressBindingsForInputActions ( keyboard , action1 , action2 ) ;
168162
169- // action2 is performed because action1 has a higher priority than action2 .
163+ // action2 is performed because action2 has a higher priority than action1 .
170164 Assert . That ( action1 . WasPerformedThisFrame ( ) , Is . False ) ;
171165 Assert . That ( action2 . WasPerformedThisFrame ( ) , Is . True ) ;
172166
167+ // Cleanup key presses
173168 ReleaseBindingsForActions ( keyboard , action1 , action2 ) ;
174169
175170 Assert . That ( action1 . WasPerformedThisFrame ( ) , Is . False ) ;
@@ -181,7 +176,6 @@ public void Actions_Priority_OnlyOneActionIsFired_WhenOnePriorityIsHigherThanOth
181176 [ TestCaseSource ( nameof ( TwoInputActionTestCases ) ) ] // TODO: Darren, Should both actions be performed this frame here??
182177 public void Actions_Priority_BothActionsArePerformed_DueToKeyPressOrderForShortcut ( TwoInputActionDataWrapper < InputAction , InputAction > twoInputActions )
183178 {
184- InputSystem . settings . shortcutKeysConsumeInput = true ;
185179 var keyboard = InputSystem . AddDevice < Keyboard > ( ) ;
186180
187181 // We swap the order here of Action1 & Action2 so key presses are done backwards, binding before modifiers.
@@ -219,7 +213,6 @@ public void Actions_Priority_BothActionsArePerformed_DueToKeyPressOrderForShortc
219213 [ TestCaseSource ( nameof ( TwoInputActionTestCases ) ) ]
220214 public void Actions_Priority_BothActionFires_WhenPriorityIsEqual ( TwoInputActionDataWrapper < InputAction , InputAction > twoInputActions )
221215 {
222- InputSystem . settings . shortcutKeysConsumeInput = true ;
223216 var keyboard = InputSystem . AddDevice < Keyboard > ( ) ;
224217
225218 var action1 = twoInputActions . Action1 ;
@@ -241,7 +234,6 @@ public void Actions_Priority_BothActionFires_WhenPriorityIsEqual(TwoInputActionD
241234 [ TestCaseSource ( nameof ( TwoInputActionTestCases ) ) ]
242235 public void Actions_Priority_BothActionsFire_WhenPriorityIsZero ( TwoInputActionDataWrapper < InputAction , InputAction > twoInputActions )
243236 {
244- InputSystem . settings . shortcutKeysConsumeInput = true ;
245237 var keyboard = InputSystem . AddDevice < Keyboard > ( ) ;
246238
247239 var action1 = twoInputActions . Action1 ;
@@ -293,7 +285,6 @@ private static IEnumerable<TwoInputActionDataWrapper<InputAction, InputAction>>
293285 [ TestCaseSource ( nameof ( TwoInputActionNoConflictingBindingTestCases ) ) ]
294286 public void Actions_Priority_BothActionsWithDifferentPriorityFire_WhenThereIsNoConflictingBinding ( TwoInputActionDataWrapper < InputAction , InputAction > twoInputActions )
295287 {
296- InputSystem . settings . shortcutKeysConsumeInput = true ;
297288 var keyboard = InputSystem . AddDevice < Keyboard > ( ) ;
298289
299290 var action1 = twoInputActions . Action1 ;
@@ -303,8 +294,7 @@ public void Actions_Priority_BothActionsWithDifferentPriorityFire_WhenThereIsNoC
303294 action2 . Priority = 1 ;
304295
305296 action1 . m_ActionMap . Enable ( ) ;
306- action2 . m_ActionMap . Enable ( ) ;
307- //
297+
308298 var action1WasPerformed = false ;
309299 action1 . performed += _ => action1WasPerformed = true ;
310300
@@ -323,7 +313,6 @@ public void Actions_Priority_BothActionsWithDifferentPriorityFire_WhenThereIsNoC
323313 [ TestCaseSource ( nameof ( TwoInputActionNoConflictingBindingTestCases ) ) ]
324314 public void Actions_Priority_BothActionsWithDifferentPriorityFire_WhenThereIsNoConflictingBindingInverseOrder ( TwoInputActionDataWrapper < InputAction , InputAction > twoInputActions )
325315 {
326- InputSystem . settings . shortcutKeysConsumeInput = true ;
327316 var keyboard = InputSystem . AddDevice < Keyboard > ( ) ;
328317
329318 var action1 = twoInputActions . Action1 ;
@@ -333,8 +322,7 @@ public void Actions_Priority_BothActionsWithDifferentPriorityFire_WhenThereIsNoC
333322 action2 . Priority = 5 ;
334323
335324 action1 . m_ActionMap . Enable ( ) ;
336- action2 . m_ActionMap . Enable ( ) ;
337- //
325+
338326 var action1WasPerformed = false ;
339327 action1 . performed += _ => action1WasPerformed = true ;
340328
@@ -353,7 +341,6 @@ public void Actions_Priority_BothActionsWithDifferentPriorityFire_WhenThereIsNoC
353341 [ TestCaseSource ( nameof ( TwoInputActionNoConflictingBindingTestCases ) ) ]
354342 public void Actions_Priority_BothActionsWithEqualPriorityFire_WhenThereIsNoConflictingBinding ( TwoInputActionDataWrapper < InputAction , InputAction > twoInputActions )
355343 {
356- InputSystem . settings . shortcutKeysConsumeInput = true ;
357344 var keyboard = InputSystem . AddDevice < Keyboard > ( ) ;
358345
359346 var action1 = twoInputActions . Action1 ;
@@ -363,7 +350,6 @@ public void Actions_Priority_BothActionsWithEqualPriorityFire_WhenThereIsNoConfl
363350 action2 . Priority = 5 ;
364351
365352 action1 . m_ActionMap . Enable ( ) ;
366- action2 . m_ActionMap . Enable ( ) ;
367353
368354 var action1WasPerformed = false ;
369355 action1 . performed += _ => action1WasPerformed = true ;
0 commit comments