From 191dbe92dc1f2789531e1a8b31e9c1e2fac57963 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sat, 15 Nov 2014 00:30:28 +0100 Subject: [PATCH] Added dualquat trivially copyable test. #263 --- test/gtx/gtx_dual_quaternion.cpp | 36 +++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/test/gtx/gtx_dual_quaternion.cpp b/test/gtx/gtx_dual_quaternion.cpp index 334bbda9..cde63c0e 100644 --- a/test/gtx/gtx_dual_quaternion.cpp +++ b/test/gtx/gtx_dual_quaternion.cpp @@ -160,15 +160,37 @@ int test_mul() return Error; } +int test_dual_quat_ctr() +{ + int Error(0); + +#if (GLM_LANG & GLM_LANG_CXX11_FLAG) || (GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12) +// Error += std::is_trivially_default_constructible::value ? 0 : 1; +// Error += std::is_trivially_default_constructible::value ? 0 : 1; +// Error += std::is_trivially_copy_assignable::value ? 0 : 1; +// Error += std::is_trivially_copy_assignable::value ? 0 : 1; + Error += std::is_trivially_copyable::value ? 0 : 1; + Error += std::is_trivially_copyable::value ? 0 : 1; + + Error += std::has_trivial_copy_constructor::value ? 0 : 1; + Error += std::has_trivial_copy_constructor::value ? 0 : 1; + Error += std::is_copy_constructible::value ? 0 : 1; + Error += std::is_copy_constructible::value ? 0 : 1; +#endif + + return Error; +} + int main() { - int Error(0); + int Error(0); - Error += test_dquat_type(); - Error += test_scalars(); - Error += test_inverse(); - Error += test_mul(); + Error += test_dual_quat_ctr(); + Error += test_dquat_type(); + Error += test_scalars(); + Error += test_inverse(); + Error += test_mul(); - //std::cout << "Errors count: " << Error << std::endl; - return Error; + //std::cout << "Errors count: " << Error << std::endl; + return Error; }