From 00d2e8a4cf261e6bf7090b8f3549d097fb3c306c Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Mon, 1 Apr 2024 01:46:25 +0300 Subject: [PATCH] suppress warnings --- test/src/test_vec2.h | 2 ++ test/src/test_vec3.h | 2 ++ test/src/test_vec4.h | 2 ++ 3 files changed, 6 insertions(+) diff --git a/test/src/test_vec2.h b/test/src/test_vec2.h index 8fd16b5..e7bfe88 100644 --- a/test/src/test_vec2.h +++ b/test/src/test_vec2.h @@ -802,11 +802,13 @@ TEST_IMPL(GLM_PREFIX, vec2_refract) { /* Air to Glass (eta = 1.0 / 1.5) */ eta = 1.0f / 1.5f; r = GLM(vec2_refract)(v, N, eta, dest); + ASSERT(r == true); ASSERT(dest[1] < -sqrtf(0.5f)); // Expect bending towards the normal /* Glass to Water (eta = 1.5 / 1.33) */ eta = 1.5f / 1.33f; r = GLM(vec2_refract)(v, N, eta, dest); + ASSERT(r == true); ASSERT(dest[1] < -sqrtf(0.5f)); // Expect bending towards the normal, less bending than air to glass /* Diamond to Air (eta = 2.42 / 1.0) */ diff --git a/test/src/test_vec3.h b/test/src/test_vec3.h index 2fffecd..6165fdb 100644 --- a/test/src/test_vec3.h +++ b/test/src/test_vec3.h @@ -1908,6 +1908,7 @@ TEST_IMPL(GLM_PREFIX, vec3_refract) { r = GLM(vec3_refract)(v, N, eta, dest); /* Expect bending towards the normal */ + ASSERT(r == true); ASSERT(dest[1] < -sqrtf(0.5f)); /* Glass to Water (eta = 1.5 / 1.33) */ @@ -1915,6 +1916,7 @@ TEST_IMPL(GLM_PREFIX, vec3_refract) { r = GLM(vec3_refract)(v, N, eta, dest); /* Expect bending towards the normal, less bending than air to glass */ + ASSERT(r == true); ASSERT(dest[1] < -sqrtf(0.5f)); /* Diamond to Air (eta = 2.42 / 1.0) */ diff --git a/test/src/test_vec4.h b/test/src/test_vec4.h index d95815a..e61bef2 100644 --- a/test/src/test_vec4.h +++ b/test/src/test_vec4.h @@ -1591,11 +1591,13 @@ TEST_IMPL(GLM_PREFIX, vec4_refract) { /* Air to Glass (eta = 1.0 / 1.5) */ eta = 1.0f / 1.5f; r = GLM(vec4_refract)(v, N, eta, dest); + ASSERT(r == true); ASSERT(dest[1] < -sqrtf(0.5f)); // Expect bending towards the normal /* Glass to Water (eta = 1.5 / 1.33) */ eta = 1.5f / 1.33f; r = GLM(vec4_refract)(v, N, eta, dest); + ASSERT(r == true); ASSERT(dest[1] < -sqrtf(0.5f)); // Expect bending towards the normal, less bending than air to glass /* Diamond to Air (eta = 2.42 / 1.0) */