Skip to content

Commit 69cebf5

Browse files
author
AJubrey
committed
[REMOVED] random white space
[ADDED] a test of the dictionary's length [CHANGED] the order of the children in one of the tests
1 parent 0269dcd commit 69cebf5

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Assets/FbxExporters/Editor/UnitTests/ConvertToModelTest.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public void MapNameToSourceTest()
195195
capsule.transform.parent = cube.transform;
196196
sphere.transform.parent = cube.transform;
197197
quad.transform.parent = cube.transform;
198-
198+
capsule.transform.SetSiblingIndex(0);
199199

200200
//Create a similar Heirarchy that we can use as our phony "exported" hierarchy.
201201
var cube2 = GameObject.CreatePrimitive(PrimitiveType.Cube);
@@ -206,9 +206,16 @@ public void MapNameToSourceTest()
206206
capsule2.transform.parent = cube2.transform;
207207
sphere2.transform.parent = cube2.transform;
208208
quad2.transform.parent = cube2.transform;
209+
capsule.transform.SetSiblingIndex(1);
209210

210211
var dictionary = ConvertToModel.MapNameToSourceRecursive(cube, cube2);
211212

213+
//We expect these to pass because we've given it an identical game object, as it would have after a normal export.
214+
Assert.AreSame(capsule2, dictionary[capsule.name]);
215+
Assert.AreSame(sphere2, dictionary[sphere.name]);
216+
Assert.AreSame(quad2, dictionary[quad.name]);
217+
Assert.True(dictionary.Count == 4);
218+
212219
//Create a broken hierarchy, one that is missing a primitive
213220
var cube3 = GameObject.CreatePrimitive(PrimitiveType.Cube);
214221
var capsule3 = GameObject.CreatePrimitive(PrimitiveType.Capsule);
@@ -219,11 +226,6 @@ public void MapNameToSourceTest()
219226

220227
var dictionaryBroken = ConvertToModel.MapNameToSourceRecursive(cube, cube3);
221228

222-
//We expect these to pass because we've given it an identical game object, as it would have after a normal export.
223-
Assert.AreSame(capsule2, dictionary[capsule.name]);
224-
Assert.AreSame(sphere2, dictionary[sphere.name]);
225-
Assert.AreSame(quad2, dictionary[quad.name]);
226-
227229
//the dictionary size should be equal to the amount of children + the parent
228230
Assert.True(dictionaryBroken.Count == 4);
229231

0 commit comments

Comments
 (0)