summaryrefslogtreecommitdiffstats
path: root/tests/core/math/test_vector3.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-06-29 19:54:26 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-06-29 19:54:26 +0200
commit2f7973f04bb4fbbad256d5427154d5d3f34de59e (patch)
tree0c8131a71653d566342f11b74ffa0828f5f5b039 /tests/core/math/test_vector3.h
parent37ea01756a0e66f0f3788712ea94b7aa3733f4eb (diff)
parent17929a34430f526f01eb4ef29329d082643a6d03 (diff)
downloadredot-engine-2f7973f04bb4fbbad256d5427154d5d3f34de59e.tar.gz
Merge pull request #93745 from AThousandShips/test_template_fix
[Tests] Fix unit tests in template builds
Diffstat (limited to 'tests/core/math/test_vector3.h')
-rw-r--r--tests/core/math/test_vector3.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/core/math/test_vector3.h b/tests/core/math/test_vector3.h
index ca0aa02882..4cab753d6f 100644
--- a/tests/core/math/test_vector3.h
+++ b/tests/core/math/test_vector3.h
@@ -368,7 +368,6 @@ TEST_CASE("[Vector3] Plane methods") {
const Vector3 vector = Vector3(1.2, 3.4, 5.6);
const Vector3 vector_y = Vector3(0, 1, 0);
const Vector3 vector_normal = Vector3(0.88763458893247992491, 0.26300284116517923701, 0.37806658417494515320);
- const Vector3 vector_non_normal = Vector3(5.4, 1.6, 2.3);
CHECK_MESSAGE(
vector.bounce(vector_y) == Vector3(1.2, -3.4, 5.6),
"Vector3 bounce on a plane with normal of the Y axis should.");
@@ -394,6 +393,8 @@ TEST_CASE("[Vector3] Plane methods") {
vector.slide(vector_normal).is_equal_approx(Vector3(-2.41848149148878681437, 2.32785733585517427722237, 4.0587949202918130235)),
"Vector3 slide with normal should return expected value.");
// There's probably a better way to test these ones?
+#ifdef MATH_CHECKS
+ const Vector3 vector_non_normal = Vector3(5.4, 1.6, 2.3);
ERR_PRINT_OFF;
CHECK_MESSAGE(
vector.bounce(vector_non_normal).is_equal_approx(Vector3()),
@@ -405,6 +406,7 @@ TEST_CASE("[Vector3] Plane methods") {
vector.slide(vector_non_normal).is_equal_approx(Vector3()),
"Vector3 slide should return empty Vector3 with non-normalized input.");
ERR_PRINT_ON;
+#endif // MATH_CHECKS
}
TEST_CASE("[Vector3] Rounding methods") {