Skip to content

Commit 7f5f2b1

Browse files
author
Dmytro Ivanov
committed
Porting some test changes from 1.1
1 parent 8f88e94 commit 7f5f2b1

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Assets/Tests/InputSystem/CoreTests_Actions.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4375,8 +4375,12 @@ public void Actions_CanPickDevicesThatMatchGivenControlScheme()
43754375

43764376
[Test]
43774377
[Category("Actions")]
4378+
#if (UNITY_ANDROID || UNITY_IOS) && !UNITY_EDITOR
4379+
[Ignore("Case 1261423 DualShock4GamepadHID is not implemented on Android/iOS")]
4380+
#endif
43784381
public void Actions_CanPickDevicesThatMatchGivenControlScheme_ReturningAccurateScoreForEachMatch()
43794382
{
4383+
#if UNITY_EDITOR || UNITY_STANDALONE_OSX || UNITY_STANDALONE_WIN || UNITY_WSA
43804384
var genericGamepad = InputSystem.AddDevice<Gamepad>();
43814385
var ps4Gamepad = InputSystem.AddDevice<DualShock4GamepadHID>();
43824386
var mouse = InputSystem.AddDevice<Mouse>();
@@ -4416,6 +4420,7 @@ public void Actions_CanPickDevicesThatMatchGivenControlScheme_ReturningAccurateS
44164420
// from the base PS4 gamepad layout.
44174421
Assert.That(ps4ToPS4.score, Is.EqualTo(1 + 0.5f));
44184422
}
4423+
#endif
44194424
}
44204425

44214426
[Test]
@@ -4472,8 +4477,12 @@ public void Actions_CanFindControlSchemeUsingGivenDevice()
44724477

44734478
[Test]
44744479
[Category("Actions")]
4480+
#if (UNITY_ANDROID || UNITY_IOS) && !UNITY_EDITOR
4481+
[Ignore("Case 1261423 DualShock4GamepadHID is not implemented on Android/iOS")]
4482+
#endif
44754483
public void Actions_WhenFindingControlSchemeUsingGivenDevice_MostSpecificControlSchemeIsChosen()
44764484
{
4485+
#if UNITY_EDITOR || UNITY_STANDALONE_OSX || UNITY_STANDALONE_WIN || UNITY_WSA
44774486
var genericGamepadScheme = new InputControlScheme("GenericGamepad")
44784487
.WithRequiredDevice("<Gamepad>");
44794488
var ps4GamepadScheme = new InputControlScheme("PS4")
@@ -4493,6 +4502,7 @@ public void Actions_WhenFindingControlSchemeUsingGivenDevice_MostSpecificControl
44934502
Is.EqualTo(ps4GamepadScheme));
44944503
Assert.That(InputControlScheme.FindControlSchemeForDevice(xboxController, new[] { genericGamepadScheme, ps4GamepadScheme, xboxGamepadScheme, mouseScheme }),
44954504
Is.EqualTo(xboxGamepadScheme));
4505+
#endif
44964506
}
44974507

44984508
// The bindings targeting an action can be masked out such that only specific

Assets/Tests/Samples/InGameHintsTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
using UnityEngine.InputSystem;
55
using UnityEngine.InputSystem.DualShock;
66
using UnityEngine.InputSystem.Samples.InGameHints;
7+
#if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX || UNITY_WSA
78
using UnityEngine.InputSystem.Switch;
9+
#endif
810
using UnityEngine.InputSystem.XInput;
911
using UnityEngine.TestTools;
1012
using UnityEngine.UI;

0 commit comments

Comments
 (0)