Skip to content

Commit b8cba16

Browse files
author
Benoit Hudson
committed
Unit test fixes.
One is Viktoria's comment on the pull request. The other two are warnings that are visible in the pro version.
1 parent 014767f commit b8cba16

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Assets/FbxExporters/Editor/UnitTests/ConvertToModelTest.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ public void ExhaustiveTests() {
339339
AssertSameHierarchy(aFbxInstanceChild, aConvert, ignoreRootName: true);
340340
var aConvertFbxPrefab = aConvert.GetComponent<FbxPrefab>();
341341
Assert.AreNotEqual(aFbx, aConvertFbxPrefab.FbxModel);
342-
Assert.AreEqual(aConvertFbxPath, AssetDatabase.GetAssetPath(aConvertFbxPrefab.FbxModel));
342+
Assert.AreEqual(aConvertFbxPath.Replace("\\","/"), AssetDatabase.GetAssetPath(aConvertFbxPrefab.FbxModel));
343343
}
344344
}
345345

@@ -473,7 +473,9 @@ public void TestConvertModelInstance()
473473
Assert.That (boxCollider, Is.Not.Null);
474474

475475
// convert to prefab
476-
GameObject converted = ConvertToModel.Convert (fbxInstance, Path.GetDirectoryName(filename));
476+
GameObject converted = ConvertToModel.Convert (fbxInstance,
477+
fbxFullPath: GetRandomFbxFilePath(),
478+
prefabFullPath: GetRandomPrefabAssetPath());
477479
Assert.That (converted, Is.EqualTo (PrefabUtility.GetPrefabParent(fbxInstance)));
478480

479481
// check meshes link to original fbx

Assets/FbxExporters/Editor/UnitTests/FbxPrefabAutoUpdaterTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ public void RemappingTest()
308308
GameObject cylinder3 = GameObject.CreatePrimitive(PrimitiveType.Cylinder);
309309
GameObject sphere3 = GameObject.CreatePrimitive(PrimitiveType.Sphere);
310310
sphere3.transform.SetParent(cylinder3.transform);
311-
GameObject sphere3Parent = ConvertToModel.Convert(sphere3, fbxFullPath: filePath, prefabFullPath: Path.ChangeExtension(filePath, ".prefab"));
311+
ConvertToModel.Convert(sphere3, fbxFullPath: filePath, prefabFullPath: Path.ChangeExtension(filePath, ".prefab"));
312312
Selection.objects = new GameObject[] { sphere3 };
313313
Assert.IsTrue(FbxPrefabAutoUpdater.OnValidateMenuItem());
314314

0 commit comments

Comments
 (0)