Skip to content

Commit 42807fd

Browse files
committed
Fix failing tests by introducing versioning.
1 parent 1f6bd45 commit 42807fd

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Assets/Tests/InputSystem/CoreTests_Actions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5215,8 +5215,8 @@ public void Actions_CanConvertAssetToAndFromJson()
52155215
static string MinimalJson(string name = null)
52165216
{
52175217
if (name != null)
5218-
return "{\n \"name\": \"" + name + "\",\n \"maps\": [],\n \"controlSchemes\": []\n}";
5219-
return "{\n \"maps\": [],\n \"controlSchemes\": []\n}";
5218+
return "{\n \"version\": 0,\n \"name\": \"" + name + "\",\n \"maps\": [],\n \"controlSchemes\": []\n}";
5219+
return "{\n \"version\": 0,\n \"maps\": [],\n \"controlSchemes\": []\n}";
52205220
}
52215221

52225222
[Test]

Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/DefaultInputActions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public class DefaultInputActions : IInputActionCollection2, IDisposable
4242
public @DefaultInputActions()
4343
{
4444
asset = InputActionAsset.FromJson(@"{
45+
""version"": 1,
4546
""name"": ""DefaultInputActions"",
4647
""maps"": [
4748
{

Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/DefaultInputActions.inputactions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"version": 1,
23
"name": "DefaultInputActions",
34
"maps": [
45
{

0 commit comments

Comments
 (0)