Skip to content

Commit acc31f7

Browse files
committed
Modified WhenAnticipating_ValueChangesImmediately test
1 parent 578c42e commit acc31f7

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

.yamato/mobile-standalone-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ build_{{ project.name }}_{{ platform.name }}_{{ editor }}:
3030
# Platform specific Build
3131
{% if platform.base == "win" %}
3232
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat
33-
- utr.bat --suite=playmode --platform={{ platform.standalone }} --testproject={{ project.path }} --architecture={{ platform.architecture }} --scripting-backend=il2cpp --editor-location=.Editor --artifacts-path=artifacts --testfilter="Unity.Netcode.RuntimeTests.*" --player-save-path=build/players --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800
33+
- utr.bat --suite=playmode --platform={{ platform.standalone }} --testproject={{ project.path }} --architecture={{ platform.architecture }} --scripting-backend=il2cpp --editor-location=.Editor --artifacts-path=artifacts --testfilter="Unity.Netcode.RuntimeTests.NetworkTransformAnticipationTests.WhenAnticipating_ValueChangesImmediately" --player-save-path=build/players --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800
3434
{% else %}
3535
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr
3636
- chmod +x ./utr
37-
- ./utr --suite=playmode --platform={{ platform.standalone }} --testproject={{ project.path }} --architecture={{ platform.architecture }} --scripting-backend=il2cpp --editor-location=.Editor --artifacts-path=artifacts --testfilter="Unity.Netcode.RuntimeTests.*" --player-save-path=build/players --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800
37+
- ./utr --suite=playmode --platform={{ platform.standalone }} --testproject={{ project.path }} --architecture={{ platform.architecture }} --scripting-backend=il2cpp --editor-location=.Editor --artifacts-path=artifacts --testfilter="Unity.Netcode.RuntimeTests.NetworkTransformAnticipationTests.WhenAnticipating_ValueChangesImmediately" --player-save-path=build/players --extra-editor-arg=-batchmode --extra-editor-arg=-nographics --reruncount=1 --clean-library-on-rerun --build-only --timeout=1800
3838
{% endif %}
3939
artifacts:
4040
players:

com.unity.netcode.gameobjects/Tests/Runtime/NetworkTransformAnticipationTests.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,11 @@ public void WhenAnticipating_ValueChangesImmediately()
125125

126126
Assert.AreEqual(new Vector3(0, 1, 2), testComponent.transform.position);
127127
Assert.AreEqual(new Vector3(1, 2, 3), testComponent.transform.localScale);
128-
Assert.AreEqual(Quaternion.LookRotation(new Vector3(2, 3, 4)), testComponent.transform.rotation);
128+
Assert.That(testComponent.transform.rotation, Is.EqualTo(Quaternion.LookRotation(new Vector3(2, 3, 4))).Using(new QuaternionEqualityComparer(0.000001f))); // Quaternion comparer added due to FP precision problems on Android devices
129129

130130
Assert.AreEqual(new Vector3(0, 1, 2), testComponent.AnticipatedState.Position);
131131
Assert.AreEqual(new Vector3(1, 2, 3), testComponent.AnticipatedState.Scale);
132-
Assert.AreEqual(Quaternion.LookRotation(new Vector3(2, 3, 4)), testComponent.AnticipatedState.Rotation);
133-
132+
Assert.That(testComponent.AnticipatedState.Rotation, Is.EqualTo(Quaternion.LookRotation(new Vector3(2, 3, 4))).Using(new QuaternionEqualityComparer(0.000001f))); // Quaternion comparer added due to FP precision problems on Android devices
134133
}
135134

136135
[Test]

0 commit comments

Comments
 (0)