Skip to content

Commit d637adf

Browse files
committed
Revert "Added a test to cover the package migration."
This reverts commit 00b37a5.
1 parent 00b37a5 commit d637adf

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

Assets/Tests/InputSystem.Editor/CustomProcessorEnumTest.cs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -108,31 +108,5 @@ public IEnumerator ProcessorEnum_ShouldSerializeByValue_WhenSerializedToAsset()
108108

109109
yield return null;
110110
}
111-
112-
[UnityTest]
113-
public IEnumerator Migration_FromLegacyJson_ShouldConvertOrdinal_KeepInvertVector2_AndSeparators()
114-
{
115-
var legacyJson = m_Asset.ToJson().Replace("\"version\": 1", "\"version\": 0").Replace("Custom(SomeEnum=10)", "Custom(SomeEnum=1)");
116-
117-
// Add a trailing processor to verify the semicolon separator is preserved.
118-
if (!legacyJson.Contains(";InvertVector2(invertX=true)"))
119-
legacyJson = legacyJson.Replace("Custom(SomeEnum=1)\"", "Custom(SomeEnum=1);InvertVector2(invertX=true)\"");
120-
121-
var migratedAsset = InputActionAsset.FromJson(legacyJson);
122-
Assume.That(migratedAsset, Is.Not.Null, "Failed to load legacy JSON into an InputActionAsset.");
123-
124-
var migratedJson = migratedAsset.ToJson();
125-
Assume.That(migratedJson, Is.Not.Null.And.Not.Empty, "Migrated JSON was empty.");
126-
127-
Assert.Less(migratedJson.IndexOf("InvertVector2(invertX=true)", StringComparison.Ordinal), migratedJson.IndexOf(",Custom(SomeEnum=20)", StringComparison.Ordinal),
128-
"Expected a comma between the first and second processors, with InvertVector2 first."
129-
);
130-
131-
Assert.Greater(migratedJson.IndexOf(";InvertVector2(invertX=true)", StringComparison.Ordinal), migratedJson.IndexOf("Custom(SomeEnum=20)", StringComparison.Ordinal),
132-
"Expected a semicolon between the second and third processors, with the trailing InvertVector2 last."
133-
);
134-
135-
yield return null;
136-
}
137111
}
138112
#endif

0 commit comments

Comments
 (0)