@@ -55,39 +55,6 @@ internal static InputAction SetupTestAction(this InputActionMap map, string[] bi
5555 return null ;
5656 }
5757 }
58-
59- internal static InputAction SetupTestAction ( this InputActionMap map , string binding )
60- {
61- // just a typical binding
62- var action = map . AddAction ( "Action1:" + binding + " " + Guid . NewGuid ( ) ) ;
63- action . AddBinding ( "<Keyboard>/" + binding ) ;
64- return action ;
65- }
66-
67- internal static InputAction SetupTestAction ( this InputActionMap map , string modifier1 , string binding )
68- {
69- // A shortcut with one modifier
70- var action = map . AddAction ( "Action2:" + modifier1 + " " + binding + " " + Guid . NewGuid ( ) ) ;
71-
72- action . AddCompositeBinding ( "OneModifier" )
73- . With ( "Modifier" , "<Keyboard>/" + modifier1 )
74- . With ( "Binding" , "<Keyboard>/" + binding ) ;
75-
76- return action ;
77- }
78-
79- internal static InputAction SetupTestAction ( this InputActionMap map , string modifier1 , string modifier2 , string binding )
80- {
81- var action = map . AddAction ( "Action3:" + modifier1 + " " + modifier2 + " " + binding + " " + Guid . NewGuid ( ) ) ;
82-
83- // A shortcut with two modifiers
84- action . AddCompositeBinding ( "TwoModifiers" )
85- . With ( "Modifier1" , "<Keyboard>/" + modifier1 )
86- . With ( "Modifier2" , "<Keyboard>/" + modifier2 )
87- . With ( "Binding" , "<Keyboard>/" + binding ) ;
88-
89- return action ;
90- }
9158}
9259
9360internal partial class CoreTests
@@ -100,13 +67,6 @@ internal partial class CoreTests
10067 ( new [ ] { "ctrl" , "shift" , "v" } , new [ ] { "shift" , "v" } ) ,
10168 } ;
10269
103- public class ThreeInputActionDataWrapper < TInputAction1 , TInputAction2 , TInputAction3 >
104- {
105- public TInputAction1 Action1 ;
106- public TInputAction2 Action2 ;
107- public TInputAction3 Action3 ;
108- }
109-
11070 private void PressBindingsForInputActions ( Keyboard keyboard , InputAction action1 , InputAction action2 , InputAction action3 = null )
11171 {
11272 for ( int i = 0 ; i < action1 . controls . Count ; i ++ )
@@ -317,21 +277,6 @@ public void Actions_Priority_BothActionsFire_WhenPriorityIsZero((string[] a1, st
317277 ( new [ ] { "ctrl" , "shift" , "v" } , new [ ] { "shift" , "z" } )
318278 } ;
319279
320- private static IEnumerable < ( InputAction , InputAction ) > TwoInputActionNoConflictingBindingTestCases ( )
321- {
322- InputActionMap map = new InputActionMap ( "map" ) ;
323- var cases = new List < ( InputAction , InputAction ) > ( )
324- {
325- ( map . SetupTestAction ( "ctrl" , "x" ) , map . SetupTestAction ( "k" ) ) ,
326- ( map . SetupTestAction ( "shift" , "n" ) , map . SetupTestAction ( "l" ) ) ,
327- ( map . SetupTestAction ( "shift" , "h" ) , map . SetupTestAction ( "l" ) ) ,
328- ( map . SetupTestAction ( "shift" , "h" ) , map . SetupTestAction ( "ctrl" , "shift" , "o" ) ) ,
329- ( map . SetupTestAction ( "ctrl" , "shift" , "v" ) , map . SetupTestAction ( "shift" , "z" ) )
330- } ;
331- foreach ( var c in cases )
332- yield return c ;
333- }
334-
335280 [ Test ]
336281 [ Category ( "Actions Priority" ) ]
337282 [ TestCaseSource ( nameof ( k_TwoInputActionNoConflictingBindingTestCases ) ) ]
@@ -422,31 +367,6 @@ public void Actions_Priority_BothActionsWithEqualPriorityFire_WhenThereIsNoConfl
422367 Assert . That ( action2 . WasPerformedThisFrame ( ) , Is . True ) ;
423368 }
424369
425- private static IEnumerable < ThreeInputActionDataWrapper < InputAction , InputAction , InputAction > > ThreeInputActionNoConflictingBindingTestCases ( )
426- {
427- InputActionMap map = new InputActionMap ( "map" ) ;
428- yield return new ThreeInputActionDataWrapper < InputAction , InputAction , InputAction >
429- {
430- Action1 = map . SetupTestAction ( "alt" , "shift" , "w" ) ,
431- Action2 = map . SetupTestAction ( "z" ) ,
432- Action3 = map . SetupTestAction ( "l" ) ,
433- } ;
434- }
435-
436- [ Test ]
437- [ Category ( "Actions Priority" ) ]
438- [ Ignore ( "Weird failing case from Anthony" ) ]
439- [ TestCaseSource ( nameof ( ThreeInputActionNoConflictingBindingTestCases ) ) ]
440- public void AltShiftW_Only_Triggers_TeamChat ( ThreeInputActionDataWrapper < InputAction , InputAction , InputAction > threeInputActions )
441- {
442- var keyboard = InputSystem . AddDevice < Keyboard > ( ) ;
443- threeInputActions . Action1 . m_ActionMap . Enable ( ) ;
444- PressBindingsForInputActions ( keyboard , threeInputActions . Action1 , threeInputActions . Action2 ) ;
445-
446-
447- Assert . That ( threeInputActions . Action1 . WasPerformedThisFrame ( ) , Is . True ) ;
448- }
449-
450370 [ Test ]
451371 [ Category ( "Actions Priority" ) ]
452372 public void Actions_Priority_ControlGroupingTable_StrideAndElementIndicesMatchInterleavedLayout ( )
0 commit comments