Skip to content

Commit bd64ebd

Browse files
committed
test cleanup
1 parent 4f9c4b2 commit bd64ebd

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

Assets/Tests/InputSystem/Plugins/PlayerInputTests.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -677,12 +677,10 @@ public void PlayerInput_AutoSwitchControlSchemesInSinglePlayerWithOnScreenContro
677677
onScreenButton.enabled = false;
678678
onScreenButton.controlPath = "<Gamepad>/buttonSouth";
679679

680-
var listener = go.AddComponent<MessageListener>();
681680
var playerInput = go.AddComponent<PlayerInput>();
682681
playerInput.defaultControlScheme = "Keyboard&Mouse";
683682
playerInput.defaultActionMap = "gameplay";
684683
playerInput.actions = InputActionAsset.FromJson(kActions);
685-
listener.messages.Clear();
686684

687685
Assert.That(playerInput.devices, Is.EquivalentTo(new InputDevice[] { keyboard, mouse }));
688686

@@ -705,12 +703,6 @@ public void PlayerInput_AutoSwitchControlSchemesInSinglePlayerWithOnScreenContro
705703
Assert.That(playerInput.user.controlScheme, Is.Not.Null);
706704
Assert.That(playerInput.user.controlScheme.Value.name, Is.EqualTo("Gamepad"));
707705

708-
709-
// Perform mouse move and click. to try to switch to Keyboard&Mouse scheme
710-
Move(mouse.position, new Vector2(0.123f, 0.234f));
711-
Click(mouse.leftButton);
712-
Move(mouse.position, new Vector2(100f, 100f));
713-
714706
// disabling the OnScreenButton to ensure that it will now switch to Keyboard&Mouse as expected
715707
onScreenButton.enabled = false;
716708

Assets/Tests/InputSystem/Plugins/UITests.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2590,9 +2590,9 @@ public IEnumerator TODO_UI_CanGetLastUsedDevice()
25902590
Assert.Fail();
25912591
}
25922592

2593-
[Test]
2593+
[UnityTest]
25942594
[Category("UI")]
2595-
public void UI_ClickDraggingMouseDoesNotAllocateGCMemory()
2595+
public IEnumerator UI_ClickDraggingMouseDoesNotAllocateGCMemory()
25962596
{
25972597
var mouse = InputSystem.AddDevice<Mouse>();
25982598

@@ -2630,6 +2630,8 @@ public void UI_ClickDraggingMouseDoesNotAllocateGCMemory()
26302630
Release(mouse.leftButton);
26312631
scene.eventSystem.InvokeUpdate();
26322632

2633+
yield return null;
2634+
26332635
var kProfilerRegion = "UI_ClickDraggingDoesNotAllocateGCMemory";
26342636

26352637
// Now for real.

0 commit comments

Comments
 (0)