diff --git a/test/core/core_type_mat2x2.cpp b/test/core/core_type_mat2x2.cpp index ce188d8a..23b6bd81 100644 --- a/test/core/core_type_mat2x2.cpp +++ b/test/core/core_type_mat2x2.cpp @@ -9,7 +9,7 @@ #include -static bool test_operators() +static int test_operators() { glm::mat2x2 m(1.0f); glm::vec2 u(1.0f); @@ -24,15 +24,14 @@ static bool test_operators() bool R = m != q; bool S = m == m; - return true; + return (S && !R) ? 0 : 1; } int main() { - bool Result = true; + int Error = 0; - Result = Result && test_operators(); + Error += test_operators(); - assert(Result); - return Result; + return Error; } diff --git a/test/core/core_type_mat2x3.cpp b/test/core/core_type_mat2x3.cpp index 92331d8e..f6311b96 100644 --- a/test/core/core_type_mat2x3.cpp +++ b/test/core/core_type_mat2x3.cpp @@ -9,7 +9,7 @@ #include -static bool test_operators() +static int test_operators() { glm::mat2x3 m(1.0f); glm::vec2 u(1.0f); @@ -24,15 +24,14 @@ static bool test_operators() bool R = m != q; bool S = m == m; - return true; + return (S && !R) ? 0 : 1; } int main() { - bool Result = true; + int Error = 0; - Result = Result && test_operators(); + Error += test_operators(); - assert(Result); - return Result; + return Error; } diff --git a/test/core/core_type_mat2x4.cpp b/test/core/core_type_mat2x4.cpp index f13db087..fad79409 100644 --- a/test/core/core_type_mat2x4.cpp +++ b/test/core/core_type_mat2x4.cpp @@ -9,7 +9,7 @@ #include -static bool test_operators() +static int test_operators() { glm::mat2x4 m(1.0f); glm::vec2 u(1.0f); @@ -24,17 +24,17 @@ static bool test_operators() bool R = m != q; bool S = m == m; - return true; + return (S && !R) ? 0 : 1; } int main() { - bool Result = true; + int Error = 0; - Result = Result && test_operators(); + Error += test_operators(); - assert(Result); - return Result; + return Error; } + diff --git a/test/core/core_type_mat3x2.cpp b/test/core/core_type_mat3x2.cpp index 8e9c8da8..7193cd8a 100644 --- a/test/core/core_type_mat3x2.cpp +++ b/test/core/core_type_mat3x2.cpp @@ -24,16 +24,16 @@ static bool test_operators() bool R = m != q; bool S = m == m; - return true; + return (S && !R) ? 0 : 1; } int main() { - bool Result = true; + int Error = 0; - Result = Result && test_operators(); + Error += test_operators(); - assert(Result); - return Result; + return Error; } + diff --git a/test/core/core_type_mat3x3.cpp b/test/core/core_type_mat3x3.cpp index 4daa1929..26a4933c 100644 --- a/test/core/core_type_mat3x3.cpp +++ b/test/core/core_type_mat3x3.cpp @@ -18,7 +18,7 @@ void print(glm::dmat3 const & Mat0) printf("\tvec3(%2.3f, %2.3f, %2.3f))\n\n", Mat0[2][0], Mat0[2][1], Mat0[2][2]); } -bool test_mat3x3() +int test_mat3x3() { glm::dmat3 Mat0( glm::dvec3(0.6f, 0.2f, 0.3f), @@ -31,10 +31,10 @@ bool test_mat3x3() print(Inv0); print(Res0); - return true; + return 0; } -static bool test_operators() +static int test_operators() { glm::mat3x3 m(1.0f); glm::vec3 u(1.0f); @@ -49,17 +49,16 @@ static bool test_operators() bool R = m != q; bool S = m == m; - return true; + return (S && !R) ? 0 : 1; } int main() { - bool Result = true; + int Error = 0; - Result = Result && test_mat3x3(); - Result = Result && test_operators(); + Error += test_mat3x3(); + Error += test_operators(); - assert(Result); - return Result; + return Error; } diff --git a/test/core/core_type_mat3x4.cpp b/test/core/core_type_mat3x4.cpp index 69a0ccad..8e36b67a 100644 --- a/test/core/core_type_mat3x4.cpp +++ b/test/core/core_type_mat3x4.cpp @@ -24,16 +24,15 @@ static bool test_operators() bool R = m != q; bool S = m == m; - return true; + return (S && !R) ? 0 : 1; } int main() { - bool Result = true; + int Error = 0; - Result = Result && test_operators(); + Error += test_operators(); - assert(Result); - return Result; + return Error; } diff --git a/test/core/core_type_mat4x2.cpp b/test/core/core_type_mat4x2.cpp index 83a69d40..989acee1 100644 --- a/test/core/core_type_mat4x2.cpp +++ b/test/core/core_type_mat4x2.cpp @@ -9,7 +9,7 @@ #include -static bool test_operators() +static int test_operators() { glm::mat4x2 m(1.0f); glm::vec4 u(1.0f); @@ -24,16 +24,15 @@ static bool test_operators() bool R = m != q; bool S = m == m; - return true; + return (S && !R) ? 0 : 1; } int main() { - bool Result = true; + int Error = 0; - Result = Result && test_operators(); + Error += test_operators(); - assert(Result); - return Result; + return Error; } diff --git a/test/core/core_type_mat4x3.cpp b/test/core/core_type_mat4x3.cpp index 893b67a4..cc46e8d4 100644 --- a/test/core/core_type_mat4x3.cpp +++ b/test/core/core_type_mat4x3.cpp @@ -9,7 +9,7 @@ #include -static bool test_operators() +static int test_operators() { glm::mat4x3 m(1.0f); glm::vec4 u(1.0f); @@ -24,17 +24,16 @@ static bool test_operators() bool R = m != q; bool S = m == m; - return true; + return (S && !R) ? 0 : 1; } int main() { - bool Result = true; + int Error = 0; - Result = Result && test_operators(); + Error += test_operators(); - assert(Result); - return Result; + return Error; } diff --git a/test/core/core_type_mat4x4.cpp b/test/core/core_type_mat4x4.cpp index a821b91a..7028d280 100644 --- a/test/core/core_type_mat4x4.cpp +++ b/test/core/core_type_mat4x4.cpp @@ -21,7 +21,7 @@ void print(glm::dmat4 const & Mat0) printf("\tvec4(%2.3f, %2.3f, %2.3f, %2.3f))\n\n", Mat0[3][0], Mat0[3][1], Mat0[3][2], Mat0[3][3]); } -bool test_mat4x4() +int test_mat4x4() { glm::dmat4 Mat0( glm::dvec4(0.6f, 0.2f, 0.3f, 0.4f), @@ -35,7 +35,7 @@ bool test_mat4x4() print(Inv0); print(Res0); - return true; + return 0; } static bool test_operators() @@ -53,16 +53,15 @@ static bool test_operators() bool R = m != q; bool S = m == m; - return true; + return (S && !R) ? 0 : 1; } int main() { - bool Result = true; + int Error = 0; - Result = Result && test_mat4x4(); - Result = Result && test_operators(); - - assert(Result); - return Result; + Error += test_mat4x4(); + Error += test_operators(); + + return Error; } diff --git a/test/core/core_type_vec1.cpp b/test/core/core_type_vec1.cpp index 9d31fcdd..fddd6a47 100644 --- a/test/core/core_type_vec1.cpp +++ b/test/core/core_type_vec1.cpp @@ -9,22 +9,21 @@ #include -static bool test_operators() +static int test_operators() { glm::vec4 A(1.0f); glm::vec4 B(1.0f); bool R = A != B; bool S = A == B; - return true; + return (S && !R) ? 0 : 1; } int main() { - bool Result = true; + int Error = 0; - Result = Result && test_operators(); + Error += test_operators(); - assert(Result); - return Result; + return Error; } diff --git a/test/core/core_type_vec2.cpp b/test/core/core_type_vec2.cpp index ab9db689..00c48a99 100644 --- a/test/core/core_type_vec2.cpp +++ b/test/core/core_type_vec2.cpp @@ -9,22 +9,21 @@ #include -static bool test_operators() +static int test_operators() { - glm::vec4 A(1.0f); - glm::vec4 B(1.0f); + glm::vec2 A(1.0f); + glm::vec2 B(1.0f); bool R = A != B; bool S = A == B; - return true; + return (S && !R) ? 0 : 1; } int main() { - bool Result = true; + int Error = 0; - Result = Result && test_operators(); - - assert(Result); - return Result; + Error += test_operators(); + + return Error; } diff --git a/test/core/core_type_vec3.cpp b/test/core/core_type_vec3.cpp index 5b2f20f1..a2b7ec49 100644 --- a/test/core/core_type_vec3.cpp +++ b/test/core/core_type_vec3.cpp @@ -9,22 +9,21 @@ #include -static bool test_operators() +static int test_operators() { - glm::vec4 A(1.0f); - glm::vec4 B(1.0f); + glm::vec3 A(1.0f); + glm::vec3 B(1.0f); bool R = A != B; bool S = A == B; - return true; + return (S && !R) ? 0 : 1; } int main() { - bool Result = true; + int Error = 0; - Result = Result && test_operators(); + Error += test_operators(); - assert(Result); - return Result; + return Error; } diff --git a/test/core/core_type_vec4.cpp b/test/core/core_type_vec4.cpp index 2edb4645..dd0769bb 100644 --- a/test/core/core_type_vec4.cpp +++ b/test/core/core_type_vec4.cpp @@ -31,41 +31,34 @@ enum comp // return _mm_shuffle_ps(Src, Src, mask<(int(W) << 6) | (int(Z) << 4) | (int(Y) << 2) | (int(X) << 0)>::value); //} -bool test_hvec4() +int test_hvec4() { glm::hvec4 const A = glm::hvec4(0, 1, 2, 3); //glm::hvec4 B = glm::swizzle(A); //glm::vec4 B = glm::detail::tvec##(glm::vec4::_size)(); - return true; + return 0; } -static bool test_operators() +static int test_operators() { glm::vec4 A(1.0f); glm::vec4 B(1.0f); bool R = A != B; bool S = A == B; - return true; + return (S && !R) ? 0 : 1; } int main() { - test_hvec4(); - //__m128 DataA = swizzle(glm::vec4(1.0f, 2.0f, 3.0f, 4.0f)); //__m128 DataB = swizzle(glm::vec4(1.0f, 2.0f, 3.0f, 4.0f)); - bool Result = true; - - Result = Result && test_operators(); - Result = Result && test_hvec4(); - - assert(Result); - return Result; - - return 0; + int Error = 0; + Error += test_operators(); + Error += test_hvec4(); + return Error; } diff --git a/test/gtc/gtc_quaternion.cpp b/test/gtc/gtc_quaternion.cpp index 0b9bc908..c018ae68 100644 --- a/test/gtc/gtc_quaternion.cpp +++ b/test/gtc/gtc_quaternion.cpp @@ -13,7 +13,7 @@ int main() { - int Failed = 0; + int Error = -1; - return Failed; + return Error; } diff --git a/test/gtx/gtx-bit.cpp b/test/gtx/gtx-bit.cpp index 99bb586f..7133b60f 100644 --- a/test/gtx/gtx-bit.cpp +++ b/test/gtx/gtx-bit.cpp @@ -129,6 +129,8 @@ namespace bitRevert int main() { - ::extractField::test(); - ::bitRevert::test(); + bool Error = 0; + Error += ::extractField::test(); + Error += ::bitRevert::test(); + return Error; } diff --git a/test/gtx/gtx-simd-vec4.cpp b/test/gtx/gtx-simd-vec4.cpp index d5df3ada..4dd85366 100644 --- a/test/gtx/gtx-simd-vec4.cpp +++ b/test/gtx/gtx-simd-vec4.cpp @@ -16,7 +16,7 @@ int main() glm::simdVec4 A1(0.0f, 0.1f, 0.2f, 0.3f); glm::simdVec4 B1(0.4f, 0.5f, 0.6f, 0.7f); glm::simdVec4 C1 = A1 + B1; - glm::simdVec4 D1 = A1.swizzle(); + //glm::simdVec4 D1 = A1.swizzle(); glm::simdVec4 E1(glm::vec4(1.0f)); glm::vec4 F1 = glm::vec4_cast(E1); //glm::vec4 G1(E1);