diff --git a/test/core/core_type_mat2x2.cpp b/test/core/core_type_mat2x2.cpp index 60ae1b1c..3b1228f1 100644 --- a/test/core/core_type_mat2x2.cpp +++ b/test/core/core_type_mat2x2.cpp @@ -146,15 +146,25 @@ int test_size() return Error; } +int test_constexpr() +{ +#if GLM_HAS_CONSTEXPR_CXX11 + static_assert(glm::mat2x2::length() == 2, "GLM: Failed constexpr"); +#endif + + return 0; +} + int main() { - int Error(0); + int Error = 0; Error += cast::test(); Error += test_ctr(); Error += test_operators(); Error += test_inverse(); Error += test_size(); + Error += test_constexpr(); return Error; } diff --git a/test/core/core_type_mat2x3.cpp b/test/core/core_type_mat2x3.cpp index a20d0e52..de98e007 100644 --- a/test/core/core_type_mat2x3.cpp +++ b/test/core/core_type_mat2x3.cpp @@ -120,6 +120,15 @@ int test_size() return Error; } +int test_constexpr() +{ +#if GLM_HAS_CONSTEXPR_CXX11 + static_assert(glm::mat2x3::length() == 2, "GLM: Failed constexpr"); +#endif + + return 0; +} + int main() { int Error = 0; @@ -128,6 +137,7 @@ int main() Error += test_ctr(); Error += test_operators(); Error += test_size(); + Error += test_constexpr(); return Error; } diff --git a/test/core/core_type_mat2x4.cpp b/test/core/core_type_mat2x4.cpp index eea3e46f..50749d22 100644 --- a/test/core/core_type_mat2x4.cpp +++ b/test/core/core_type_mat2x4.cpp @@ -108,7 +108,7 @@ namespace cast } }//namespace cast -int test_size() +static int test_size() { int Error = 0; @@ -122,6 +122,15 @@ int test_size() return Error; } +static int test_constexpr() +{ +#if GLM_HAS_CONSTEXPR_CXX11 + static_assert(glm::mat2x4::length() == 2, "GLM: Failed constexpr"); +#endif + + return 0; +} + int main() { int Error = 0; @@ -130,6 +139,7 @@ int main() Error += test_ctr(); Error += test_operators(); Error += test_size(); + Error += test_constexpr(); return Error; } diff --git a/test/core/core_type_mat3x2.cpp b/test/core/core_type_mat3x2.cpp index d3b9e95b..14a5f1e7 100644 --- a/test/core/core_type_mat3x2.cpp +++ b/test/core/core_type_mat3x2.cpp @@ -110,7 +110,7 @@ namespace cast } }//namespace cast -int test_size() +static int test_size() { int Error = 0; @@ -124,6 +124,15 @@ int test_size() return Error; } +static int test_constexpr() +{ +#if GLM_HAS_CONSTEXPR_CXX11 + static_assert(glm::mat3x2::length() == 3, "GLM: Failed constexpr"); +#endif + + return 0; +} + int main() { int Error = 0; @@ -132,6 +141,7 @@ int main() Error += test_ctr(); Error += test_operators(); Error += test_size(); + Error += test_constexpr(); return Error; } diff --git a/test/core/core_type_mat3x3.cpp b/test/core/core_type_mat3x3.cpp index a9153d44..e9e4b070 100644 --- a/test/core/core_type_mat3x3.cpp +++ b/test/core/core_type_mat3x3.cpp @@ -169,7 +169,7 @@ namespace cast } }//namespace cast -int test_size() +static int test_size() { int Error = 0; @@ -183,6 +183,15 @@ int test_size() return Error; } +static int test_constexpr() +{ +#if GLM_HAS_CONSTEXPR_CXX11 + static_assert(glm::mat3x3::length() == 3, "GLM: Failed constexpr"); +#endif + + return 0; +} + int main() { int Error = 0; @@ -193,6 +202,7 @@ int main() Error += test_operators(); Error += test_inverse(); Error += test_size(); + Error += test_constexpr(); return Error; } diff --git a/test/core/core_type_mat3x4.cpp b/test/core/core_type_mat3x4.cpp index 74a45d87..29accacc 100644 --- a/test/core/core_type_mat3x4.cpp +++ b/test/core/core_type_mat3x4.cpp @@ -112,7 +112,7 @@ namespace cast } }//namespace cast -int test_size() +static int test_size() { int Error = 0; @@ -126,6 +126,15 @@ int test_size() return Error; } +static int test_constexpr() +{ +#if GLM_HAS_CONSTEXPR_CXX11 + static_assert(glm::mat3x4::length() == 3, "GLM: Failed constexpr"); +#endif + + return 0; +} + int main() { int Error = 0; @@ -134,6 +143,7 @@ int main() Error += test_ctr(); Error += test_operators(); Error += test_size(); + Error += test_constexpr(); return Error; } diff --git a/test/core/core_type_mat4x2.cpp b/test/core/core_type_mat4x2.cpp index 1a956073..915505d6 100644 --- a/test/core/core_type_mat4x2.cpp +++ b/test/core/core_type_mat4x2.cpp @@ -114,7 +114,7 @@ namespace cast } }//namespace cast -int test_size() +static int test_size() { int Error = 0; @@ -128,6 +128,15 @@ int test_size() return Error; } +static int test_constexpr() +{ +#if GLM_HAS_CONSTEXPR_CXX11 + static_assert(glm::mat4x2::length() == 4, "GLM: Failed constexpr"); +#endif + + return 0; +} + int main() { int Error = 0; @@ -136,6 +145,7 @@ int main() Error += test_ctr(); Error += test_operators(); Error += test_size(); + Error += test_constexpr(); return Error; } diff --git a/test/core/core_type_mat4x3.cpp b/test/core/core_type_mat4x3.cpp index e2e50db0..1c8e47f6 100644 --- a/test/core/core_type_mat4x3.cpp +++ b/test/core/core_type_mat4x3.cpp @@ -114,7 +114,7 @@ namespace cast } }//namespace cast -int test_size() +static int test_size() { int Error = 0; @@ -128,6 +128,15 @@ int test_size() return Error; } +static int test_constexpr() +{ +#if GLM_HAS_CONSTEXPR_CXX11 + static_assert(glm::mat4x3::length() == 4, "GLM: Failed constexpr"); +#endif + + return 0; +} + int main() { int Error = 0; @@ -136,6 +145,7 @@ int main() Error += test_ctr(); Error += test_operators(); Error += test_size(); + Error += test_constexpr(); return Error; } diff --git a/test/core/core_type_mat4x4.cpp b/test/core/core_type_mat4x4.cpp index 8cd83a58..a42dd048 100644 --- a/test/core/core_type_mat4x4.cpp +++ b/test/core/core_type_mat4x4.cpp @@ -305,7 +305,7 @@ struct repro glm::mat4* matrix; }; -int test_size() +static int test_size() { int Error = 0; @@ -319,6 +319,15 @@ int test_size() return Error; } +static int test_constexpr() +{ +#if GLM_HAS_CONSTEXPR_CXX11 + static_assert(glm::mat4::length() == 4, "GLM: Failed constexpr"); +#endif + + return 0; +} + int main() { int Error = 0; @@ -332,6 +341,7 @@ int main() Error += test_operators(); Error += test_inverse(); Error += test_size(); + Error += test_constexpr(); Error += perf_mul(); diff --git a/test/core/core_type_vec1.cpp b/test/core/core_type_vec1.cpp index cd2f1a49..1bb4b358 100644 --- a/test/core/core_type_vec1.cpp +++ b/test/core/core_type_vec1.cpp @@ -94,7 +94,7 @@ int test_vec1_ctor() return Error; } -int test_vec1_size() +static int test_vec1_size() { int Error = 0; @@ -110,7 +110,7 @@ int test_vec1_size() return Error; } -int test_vec1_operator_increment() +static int test_vec1_operator_increment() { int Error(0); diff --git a/test/core/core_type_vec2.cpp b/test/core/core_type_vec2.cpp index 42e73889..9cc86442 100644 --- a/test/core/core_type_vec2.cpp +++ b/test/core/core_type_vec2.cpp @@ -12,7 +12,7 @@ static glm::vec2 g1; static glm::vec2 g2(1); static glm::vec2 g3(1, 1); -int test_vec2_operators() +static int test_operators() { int Error = 0; @@ -197,7 +197,7 @@ int test_vec2_operators() return Error; } -int test_vec2_ctor() +static int test_ctor() { int Error = 0; @@ -299,7 +299,7 @@ int test_vec2_ctor() return Error; } -int test_vec2_size() +static int test_size() { int Error = 0; @@ -318,9 +318,9 @@ int test_vec2_size() return Error; } -int test_operator_increment() +static int test_operator_increment() { - int Error(0); + int Error = 0; glm::ivec2 v0(1); glm::ivec2 v1(v0); @@ -345,7 +345,7 @@ int test_operator_increment() return Error; } -int test_vec2_constexpr() +static int test_constexpr() { #if GLM_HAS_CONSTEXPR_CXX11 static_assert(glm::vec2::length() == 2, "GLM: Failed constexpr"); @@ -359,11 +359,11 @@ int main() { int Error = 0; - Error += test_vec2_size(); - Error += test_vec2_ctor(); - Error += test_vec2_operators(); + Error += test_size(); + Error += test_ctor(); + Error += test_operators(); Error += test_operator_increment(); - Error += test_vec2_constexpr(); + Error += test_constexpr(); return Error; } diff --git a/test/core/core_type_vec3.cpp b/test/core/core_type_vec3.cpp index 3caa378c..652887f6 100644 --- a/test/core/core_type_vec3.cpp +++ b/test/core/core_type_vec3.cpp @@ -531,7 +531,7 @@ int test_vec3_swizzle_partial() } #endif//!GLM_HAS_ONLY_XYZW -int test_operator_increment() +static int test_operator_increment() { int Error(0); @@ -558,7 +558,7 @@ int test_operator_increment() return Error; } -int test_vec3_constexpr() +static int test_constexpr() { #if GLM_HAS_CONSTEXPR_CXX11 static_assert(glm::vec3::length() == 3, "GLM: Failed constexpr"); @@ -579,7 +579,7 @@ int main() Error += test_vec3_swizzle3_2(); Error += test_vec3_swizzle3_3(); Error += test_operator_increment(); - Error += test_vec3_constexpr(); + Error += test_constexpr(); # if !GLM_HAS_ONLY_XYZW Error += test_vec3_swizzle_partial(); diff --git a/test/core/core_type_vec4.cpp b/test/core/core_type_vec4.cpp index 9d226a64..f4701914 100644 --- a/test/core/core_type_vec4.cpp +++ b/test/core/core_type_vec4.cpp @@ -344,7 +344,7 @@ static int test_bvec4_ctor() return Error; } -static int test_vec4_operators() +static int test_operators() { int Error = 0; @@ -480,7 +480,7 @@ static int test_vec4_operators() return Error; } -static int test_vec4_equal() +static int test_equal() { int Error = 0; @@ -501,7 +501,7 @@ static int test_vec4_equal() return Error; } -static int test_vec4_size() +static int test_size() { int Error = 0; @@ -521,7 +521,7 @@ static int test_vec4_size() return Error; } -static int test_vec4_swizzle_partial() +static int test_swizzle_partial() { int Error = 0; @@ -560,7 +560,7 @@ static int test_vec4_swizzle_partial() static int test_operator_increment() { - int Error(0); + int Error = 0; glm::ivec4 v0(1); glm::ivec4 v1(v0); @@ -593,9 +593,9 @@ struct AoS glm::vec2 D; }; -static int test_vec4_perf_AoS(std::size_t Size) +static int test_perf_AoS(std::size_t Size) { - int Error(0); + int Error = 0; std::vector In; std::vector Out; @@ -614,9 +614,9 @@ static int test_vec4_perf_AoS(std::size_t Size) return Error; } -static int test_vec4_perf_SoA(std::size_t Size) +static int test_perf_SoA(std::size_t Size) { - int Error(0); + int Error = 0; std::vector InA; std::vector InB; @@ -680,7 +680,7 @@ namespace heap } }//namespace heap -static int test_vec4_simd() +static int test_simd() { int Error = 0; @@ -720,7 +720,7 @@ static int test_inheritance() return Error; } -int test_vec4_constexpr() +static int test_constexpr() { #if GLM_HAS_CONSTEXPR_CXX11 static_assert(glm::vec4::length() == 4, "GLM: Failed constexpr"); @@ -782,20 +782,20 @@ int main() std::size_t const Size(1); # endif//NDEBUG - Error += test_vec4_perf_AoS(Size); - Error += test_vec4_perf_SoA(Size); + Error += test_perf_AoS(Size); + Error += test_perf_SoA(Size); Error += test_vec4_ctor(); Error += test_bvec4_ctor(); - Error += test_vec4_size(); - Error += test_vec4_operators(); - Error += test_vec4_equal(); - Error += test_vec4_swizzle_partial(); - Error += test_vec4_simd(); + Error += test_size(); + Error += test_operators(); + Error += test_equal(); + Error += test_swizzle_partial(); + Error += test_simd(); Error += test_operator_increment(); Error += heap::test(); Error += test_inheritance(); - Error += test_vec4_constexpr(); + Error += test_constexpr(); return Error; } diff --git a/test/ext/ext_vec1.cpp b/test/ext/ext_vec1.cpp index 91b45cb8..ceecfee0 100644 --- a/test/ext/ext_vec1.cpp +++ b/test/ext/ext_vec1.cpp @@ -6,7 +6,7 @@ static glm::vec1 g1; static glm::vec1 g2(1); -int test_vec1_operators() +static int test_vec1_operators() { int Error(0); @@ -34,7 +34,7 @@ int test_vec1_operators() return Error; } -int test_vec1_ctor() +static int test_vec1_ctor() { int Error = 0; @@ -63,7 +63,7 @@ int test_vec1_ctor() return Error; } -int test_vec1_size() +static int test_vec1_size() { int Error = 0; @@ -82,7 +82,7 @@ int test_vec1_size() return Error; } -int test_vec1_operator_increment() +static int test_vec1_operator_increment() { int Error(0); @@ -132,7 +132,7 @@ static int test_bvec1_ctor() return Error; } -int test_vec1_constexpr() +static int test_constexpr() { #if GLM_HAS_CONSTEXPR_CXX11 static_assert(glm::vec1::length() == 1, "GLM: Failed constexpr"); @@ -151,7 +151,7 @@ int main() Error += test_bvec1_ctor(); Error += test_vec1_operators(); Error += test_vec1_operator_increment(); - Error += test_vec1_constexpr(); + Error += test_constexpr(); return Error; }