From 2238fd127c9e37c774783c864c0813c830b12d4e Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Tue, 23 Aug 2022 18:01:05 +0300 Subject: [PATCH] win: suppress warnings for tests --- test/src/test_ivec2.h | 2 +- test/src/test_ivec3.h | 2 +- test/src/test_ivec4.h | 10 +++++----- test/src/test_vec2.h | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/test/src/test_ivec2.h b/test/src/test_ivec2.h index 5374688..63f32bb 100644 --- a/test/src/test_ivec2.h +++ b/test/src/test_ivec2.h @@ -143,7 +143,7 @@ TEST_IMPL(GLM_PREFIX, ivec2_distance) { float v; v = GLM(ivec2_distance)(a, b); - ASSERT(test_eq(v, 5.8309518948)) + ASSERT(test_eq(v, 5.8309518948f)) TEST_SUCCESS } diff --git a/test/src/test_ivec3.h b/test/src/test_ivec3.h index dfa8794..260b7a3 100644 --- a/test/src/test_ivec3.h +++ b/test/src/test_ivec3.h @@ -148,7 +148,7 @@ TEST_IMPL(GLM_PREFIX, ivec3_distance) { float v; v = GLM(ivec3_distance)(a, b); - ASSERT(test_eq(v, 6.1644140029)) + ASSERT(test_eq(v, 6.1644140029f)) TEST_SUCCESS } diff --git a/test/src/test_ivec4.h b/test/src/test_ivec4.h index dd2d606..48b3c41 100644 --- a/test/src/test_ivec4.h +++ b/test/src/test_ivec4.h @@ -12,10 +12,10 @@ TEST_IMPL(GLM_PREFIX, ivec4) { ivec4 v4; GLM(ivec4)(v3, 7, v4); - ASSERT(test_eq(v4[0], 2)) - ASSERT(test_eq(v4[1], 3)) - ASSERT(test_eq(v4[2], 5)) - ASSERT(test_eq(v4[3], 7)) + ASSERT(v4[0] == 2) + ASSERT(v4[1] == 3) + ASSERT(v4[2] == 5) + ASSERT(v4[3] == 7) TEST_SUCCESS } @@ -158,7 +158,7 @@ TEST_IMPL(GLM_PREFIX, ivec4_distance) { float v; v = GLM(ivec4_distance)(a, b); - ASSERT(test_eq(v, 7.9372539331)) + ASSERT(test_eq(v, 7.9372539331f)) TEST_SUCCESS } diff --git a/test/src/test_vec2.h b/test/src/test_vec2.h index 9e53f72..a300af7 100644 --- a/test/src/test_vec2.h +++ b/test/src/test_vec2.h @@ -598,7 +598,7 @@ TEST_IMPL(GLM_PREFIX, vec2_lerp) { TEST_IMPL(GLM_PREFIX, vec2_complex_mul) { vec2 v1 = { 3.0f, 5.0f }, v2 = { 7.0f, 11.0f }, - v3 = { cosf(M_PI/4.0f), sinf(M_PI/4.0f) }; + v3 = { cosf(GLM_PIf/4.0f), sinf(GLM_PIf/4.0f) }; GLM(vec2_complex_mul)(v1, v2, v2); ASSERTIFY(test_assert_vec2_eq(v2, (vec2){ -34, 68 })) @@ -612,8 +612,8 @@ TEST_IMPL(GLM_PREFIX, vec2_complex_mul) { TEST_IMPL(GLM_PREFIX, vec2_complex_div) { vec2 v1 = { -34.0f, 68.0f }, v2 = { 3.0f, 5.0f }, - v3 = { cosf(M_PI/4.0f), sinf(M_PI/4.0f) }, - v4 = { cosf(M_PI/4.0f), -sinf(M_PI/4.0f) }; + v3 = { cosf(GLM_PIf/4.0f), sinf(GLM_PIf/4.0f) }, + v4 = { cosf(GLM_PIf/4.0f), -sinf(GLM_PIf/4.0f) }; GLM(vec2_complex_div)(v1, v2, v2); ASSERTIFY(test_assert_vec2_eq(v2, (vec2){ 7.0f, 11.0f }))