Skip to content

Commit

Permalink
test: fixed failed fixture assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
Cammin committed Oct 17, 2024
1 parent 885860c commit b7c9307
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 55 deletions.
2 changes: 1 addition & 1 deletion Assets/Tests/EditMode/FieldsComponent/FixtureAssertions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class FixtureAssertions : FieldsTestBase
[Test, TestCaseSource(nameof(Arrays))]
public void IsArraySizeExpected(string s)
{
Assert.AreEqual(Fields.GetArraySize(s), 2);
Assert.AreEqual(2, Fields.GetArraySize(s));
}

[Test, TestCaseSource(nameof(All))]
Expand Down
4 changes: 2 additions & 2 deletions Assets/Tests/PlayMode/Fixtures/FixtureConsts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public static class FixtureConsts
{ SINGLE_FILE_PATH, "filepath.txt" },
{ SINGLE_TILE, FieldsFixture.LoadSprite() },
{ SINGLE_ENTITY_REF, null },
{ SINGLE_POINT, new Vector2(124.2f, 123.45f) },
{ SINGLE_POINT, new Vector2(11f, 10f) },
};
public static readonly Dictionary<string, object[]> ExpectedArrayValues = new Dictionary<string, object[]>()
{
Expand All @@ -138,7 +138,7 @@ public static class FixtureConsts
{ ARRAY_FILE_PATH, new object[]{"", "TestAllFields.ldtk"} },
{ ARRAY_TILE, new object[]{null, FieldsFixture.LoadSprite() } },
{ ARRAY_ENTITY_REF, new object[]{null, null} },
{ ARRAY_POINT, new object[]{new Vector2(8.5f, -2.5f), new Vector2(4.5f, -2.5f)} },
{ ARRAY_POINT, new object[]{new Vector2(9f, 9f), new Vector2(10f, 9f)} },
};
}
}
52 changes: 1 addition & 51 deletions Assets/Tests/PlayMode/Fixtures/Resources/FieldsFixture.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,13 @@ Transform:
m_GameObject: {fileID: 5727530961208393058}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 3.47, y: -1.5, z: 0}
m_LocalPosition: {x: 10, y: 10, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 4866602107094945190}
- {fileID: 8578305485022708441}
- {fileID: 6033355314831019669}
- {fileID: 8485407640382804481}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &5729512029849994897
Expand Down Expand Up @@ -848,24 +847,6 @@ MonoBehaviour:
_layerIid:
_levelIid:
_worldIid:
- _type: 9
_canBeNull: 0
_isNotNull: 0
_min: 0
_max: 0
_int: 0
_float: 0
_bool: 0
_string:
_color: {r: 1, g: 1, b: 1, a: 1}
_vector2: {x: 4.5, y: -2.5}
_sprite: {fileID: 0}
_obj: {fileID: 8485407640382804481}
_entityRef:
_entityIid:
_layerIid:
_levelIid:
_worldIid:
--- !u!114 &3054298492229328851
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -939,34 +920,3 @@ Transform:
m_Children: []
m_Father: {fileID: 1231602690551946034}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &8241781119640967340
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8485407640382804481}
m_Layer: 0
m_Name: points_3
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8485407640382804481
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8241781119640967340}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 1, y: -1, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1231602690551946034}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Transform:
m_GameObject: {fileID: 5727530961208393058}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 3.47, y: -1.5, z: 0}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
Expand Down

0 comments on commit b7c9307

Please sign in to comment.