From 141c1856a73933c4b0e11155e7d2c067627e0852 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sat, 15 Nov 2014 00:49:12 +0100 Subject: [PATCH] Removed in GLM tests, use instead --- readme.txt | 1 + test/core/core_setup_message.cpp | 100 +++++++++++++++---------------- test/gtc/gtc_noise.cpp | 1 - test/gtc/gtc_random.cpp | 1 - test/gtc/gtc_ulp.cpp | 1 - test/gtx/gtx_dual_quaternion.cpp | 3 +- test/gtx/gtx_euler_angle.cpp | 20 +++---- test/gtx/gtx_simd_mat4.cpp | 1 - test/gtx/gtx_string_cast.cpp | 3 - test/gtx/gtx_vector_angle.cpp | 1 - 10 files changed, 62 insertions(+), 70 deletions(-) diff --git a/readme.txt b/readme.txt index aeec6c4e..3c6b17ea 100644 --- a/readme.txt +++ b/readme.txt @@ -72,6 +72,7 @@ Improvements: - Reduced integer type redifinitions #233 - Rewrited of GTX_fast_trigonometry #264 #265 - Made types trivially copyable #263 +- Removed in GLM tests Fixes: - Fixed std::nextafter not supported with C++11 on Android #217 diff --git a/test/core/core_setup_message.cpp b/test/core/core_setup_message.cpp index 84be5185..dc75b98a 100644 --- a/test/core/core_setup_message.cpp +++ b/test/core/core_setup_message.cpp @@ -9,7 +9,7 @@ #define GLM_MESSAGES #include -#include +#include int test_compiler() { @@ -20,22 +20,22 @@ int test_compiler() switch(GLM_COMPILER) { case GLM_COMPILER_VC10: - std::cout << "GLM_COMPILER_VC10" << std::endl; + std::printf("GLM_COMPILER_VC10\n"); break; case GLM_COMPILER_VC11: - std::cout << "GLM_COMPILER_VC11" << std::endl; + std::printf("GLM_COMPILER_VC11\n"); break; case GLM_COMPILER_VC12: - std::cout << "GLM_COMPILER_VC12" << std::endl; + std::printf("GLM_COMPILER_VC12\n"); break; case GLM_COMPILER_VC13: - std::cout << "GLM_COMPILER_VC13" << std::endl; + std::printf("GLM_COMPILER_VC13\n"); break; case GLM_COMPILER_VC14: - std::cout << "GLM_COMPILER_VC14" << std::endl; + std::printf("GLM_COMPILER_VC14\n"); break; default: - std::cout << "Visual C++ version not detected" << std::endl; + std::printf("Visual C++ version not detected\n"); Error += 1; break; } @@ -45,66 +45,66 @@ int test_compiler() switch(GLM_COMPILER) { case GLM_COMPILER_GCC42: - std::cout << "GLM_COMPILER_GCC42" << std::endl; + std::printf("GLM_COMPILER_GCC42\n"); break; case GLM_COMPILER_GCC43: - std::cout << "GLM_COMPILER_GCC43" << std::endl; + std::printf("GLM_COMPILER_GCC43\n"); break; case GLM_COMPILER_GCC44: - std::cout << "GLM_COMPILER_GCC44" << std::endl; + std::printf("GLM_COMPILER_GCC44\n"); break; case GLM_COMPILER_GCC45: - std::cout << "GLM_COMPILER_GCC45" << std::endl; + std::printf("GLM_COMPILER_GCC45\n"); break; case GLM_COMPILER_GCC46: - std::cout << "GLM_COMPILER_GCC46" << std::endl; + std::printf("GLM_COMPILER_GCC46\n"); break; case GLM_COMPILER_GCC47: - std::cout << "GLM_COMPILER_GCC47" << std::endl; + std::printf("GLM_COMPILER_GCC47\n"); break; case GLM_COMPILER_GCC48: - std::cout << "GLM_COMPILER_GCC48" << std::endl; + std::printf("GLM_COMPILER_GCC48\n"); break; case GLM_COMPILER_GCC49: - std::cout << "GLM_COMPILER_GCC49" << std::endl; + std::printf("GLM_COMPILER_GCC49\n"); break; case GLM_COMPILER_GCC50: - std::cout << "GLM_COMPILER_GCC50" << std::endl; + std::printf("GLM_COMPILER_GCC50\n"); break; default: - std::cout << "GCC version not detected" << std::endl; + std::printf("GCC version not detected\n"); Error += 1; break; } } else if(GLM_COMPILER & GLM_COMPILER_CUDA) { - std::cout << "GLM_COMPILER_CUDA" << std::endl; + std::printf("GLM_COMPILER_CUDA\n"); } else if(GLM_COMPILER & GLM_COMPILER_APPLE_CLANG) { switch(GLM_COMPILER) { case GLM_COMPILER_APPLE_CLANG40: - std::cout << "GLM_COMPILER_APPLE_CLANG40" << std::endl; + std::printf("GLM_COMPILER_APPLE_CLANG40\n"); break; case GLM_COMPILER_APPLE_CLANG41: - std::cout << "GLM_COMPILER_APPLE_CLANG41" << std::endl; + std::printf("GLM_COMPILER_APPLE_CLANG41\n"); break; case GLM_COMPILER_APPLE_CLANG42: - std::cout << "GLM_COMPILER_APPLE_CLANG42" << std::endl; + std::printf("GLM_COMPILER_APPLE_CLANG42\n"); break; case GLM_COMPILER_APPLE_CLANG50: - std::cout << "GLM_COMPILER_APPLE_CLANG50" << std::endl; + std::printf("GLM_COMPILER_APPLE_CLANG50\n"); break; case GLM_COMPILER_APPLE_CLANG51: - std::cout << "GLM_COMPILER_APPLE_CLANG51" << std::endl; + std::printf("GLM_COMPILER_APPLE_CLANG51\n"); break; case GLM_COMPILER_APPLE_CLANG60: - std::cout << "GLM_COMPILER_APPLE_CLANG60" << std::endl; + std::printf("GLM_COMPILER_APPLE_CLANG60\n"); break; default: - std::cout << "Apple Clang version not detected" << std::endl; + std::printf("Apple Clang version not detected\n"); break; } } @@ -113,25 +113,25 @@ int test_compiler() switch(GLM_COMPILER) { case GLM_COMPILER_LLVM30: - std::cout << "GLM_COMPILER_LLVM30" << std::endl; + std::printf("GLM_COMPILER_LLVM30\n"); break; case GLM_COMPILER_LLVM31: - std::cout << "GLM_COMPILER_LLVM31" << std::endl; + std::printf("GLM_COMPILER_LLVM31\n"); break; case GLM_COMPILER_LLVM32: - std::cout << "GLM_COMPILER_LLVM32" << std::endl; + std::printf("GLM_COMPILER_LLVM32\n"); break; case GLM_COMPILER_LLVM33: - std::cout << "GLM_COMPILER_LLVM33" << std::endl; + std::printf("GLM_COMPILER_LLVM33\n"); break; case GLM_COMPILER_LLVM34: - std::cout << "GLM_COMPILER_LLVM34" << std::endl; + std::printf("GLM_COMPILER_LLVM34\n"); break; case GLM_COMPILER_LLVM35: - std::cout << "GLM_COMPILER_LLVM35" << std::endl; + std::printf("GLM_COMPILER_LLVM35\n"); break; default: - std::cout << "LLVM version not detected" << std::endl; + std::printf("LLVM version not detected\n"); break; } } @@ -140,29 +140,29 @@ int test_compiler() switch(GLM_COMPILER) { case GLM_COMPILER_INTEL12: - std::cout << "GLM_COMPILER_INTEL12" << std::endl; + std::printf("GLM_COMPILER_INTEL12\n"); break; case GLM_COMPILER_INTEL12_1: - std::cout << "GLM_COMPILER_INTEL12_1" << std::endl; + std::printf("GLM_COMPILER_INTEL12_1\n"); break; case GLM_COMPILER_INTEL13: - std::cout << "GLM_COMPILER_INTEL13" << std::endl; + std::printf("GLM_COMPILER_INTEL13\n"); break; case GLM_COMPILER_INTEL14: - std::cout << "GLM_COMPILER_INTEL14" << std::endl; + std::printf("GLM_COMPILER_INTEL14\n"); break; case GLM_COMPILER_INTEL15: - std::cout << "GLM_COMPILER_INTEL15" << std::endl; + std::printf("GLM_COMPILER_INTEL15\n"); break; default: - std::cout << "Intel compiler version not detected" << std::endl; + std::printf("Intel compiler version not detected\n"); Error += 1; break; } } else { - std::cout << "Undetected compiler" << std::endl; + std::printf("Undetected compiler\n"); Error += 1; } @@ -176,9 +176,9 @@ int test_model() Error += ((sizeof(void*) == 4) && (GLM_MODEL == GLM_MODEL_32)) || ((sizeof(void*) == 8) && (GLM_MODEL == GLM_MODEL_64)) ? 0 : 1; if(GLM_MODEL == GLM_MODEL_32) - std::cout << "GLM_MODEL_32" << std::endl; + std::printf("GLM_MODEL_32\n"); else if(GLM_MODEL == GLM_MODEL_64) - std::cout << "GLM_MODEL_64" << std::endl; + std::printf("GLM_MODEL_64\n"); return Error; } @@ -187,29 +187,29 @@ int test_instruction_set() { int Error = 0; - std::cout << "GLM_ARCH: "; + std::printf("GLM_ARCH: "); if(GLM_ARCH == GLM_ARCH_PURE) - std::cout << "GLM_ARCH_PURE "; + std::printf("GLM_ARCH_PURE "); if(GLM_ARCH & GLM_ARCH_AVX2) - std::cout << "GLM_ARCH_AVX2 "; + std::printf("GLM_ARCH_AVX2 "); if(GLM_ARCH & GLM_ARCH_AVX) - std::cout << "GLM_ARCH_AVX "; + std::printf("GLM_ARCH_AVX "); if(GLM_ARCH & GLM_ARCH_AVX) - std::cout << "GLM_ARCH_SSE4 "; + std::printf("GLM_ARCH_SSE4 "); if(GLM_ARCH & GLM_ARCH_SSE3) - std::cout << "GLM_ARCH_SSE3 "; + std::printf("GLM_ARCH_SSE3 "); if(GLM_ARCH & GLM_ARCH_SSE2) - std::cout << "GLM_ARCH_SSE2 "; + std::printf("GLM_ARCH_SSE2 "); - std::cout << std::endl; + std::printf("\n"); return Error; } int test_cpp_version() { - std::cout << "__cplusplus: " << __cplusplus << std::endl; + std::printf("__cplusplus: %d\n", __cplusplus); return 0; } diff --git a/test/gtc/gtc_noise.cpp b/test/gtc/gtc_noise.cpp index c46fb967..dee176b9 100644 --- a/test/gtc/gtc_noise.cpp +++ b/test/gtc/gtc_noise.cpp @@ -10,7 +10,6 @@ #include #include #include -#include int test_simplex() { diff --git a/test/gtc/gtc_random.cpp b/test/gtc/gtc_random.cpp index 5e2333ec..7429554f 100644 --- a/test/gtc/gtc_random.cpp +++ b/test/gtc/gtc_random.cpp @@ -9,7 +9,6 @@ #include #include -#include #if(GLM_LANG & GLM_LANG_CXX0X_FLAG) # include #endif diff --git a/test/gtc/gtc_ulp.cpp b/test/gtc/gtc_ulp.cpp index 3da9f082..7c73175d 100644 --- a/test/gtc/gtc_ulp.cpp +++ b/test/gtc/gtc_ulp.cpp @@ -8,7 +8,6 @@ /////////////////////////////////////////////////////////////////////////////////////////////////// #include -#include #include int test_ulp_float_dist() diff --git a/test/gtx/gtx_dual_quaternion.cpp b/test/gtx/gtx_dual_quaternion.cpp index a9ade442..38d72360 100644 --- a/test/gtx/gtx_dual_quaternion.cpp +++ b/test/gtx/gtx_dual_quaternion.cpp @@ -12,8 +12,7 @@ #include #include #include - -#include +#include int myrand() { diff --git a/test/gtx/gtx_euler_angle.cpp b/test/gtx/gtx_euler_angle.cpp index d278c0e5..330f6863 100644 --- a/test/gtx/gtx_euler_angle.cpp +++ b/test/gtx/gtx_euler_angle.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include namespace test_eulerAngleX { @@ -302,17 +302,17 @@ namespace test_eulerAngleYXZ glm::fmat4 rotationInvertedY = glm::eulerAngleY(-1.f*first) * glm::eulerAngleX(second) * glm::eulerAngleZ(third); glm::fmat4 rotationDumb = glm::fmat4(); - rotationDumb = glm::rotate(rotationDumb, first, glm::fvec3(0,1,0)); - rotationDumb = glm::rotate(rotationDumb, second, glm::fvec3(1,0,0)); - rotationDumb = glm::rotate(rotationDumb, third, glm::fvec3(0,0,1)); + rotationDumb = glm::rotate(rotationDumb, first, glm::fvec3(0,1,0)); + rotationDumb = glm::rotate(rotationDumb, second, glm::fvec3(1,0,0)); + rotationDumb = glm::rotate(rotationDumb, third, glm::fvec3(0,0,1)); - std::cout << glm::to_string(glm::fmat3(rotationEuler)) << std::endl; - std::cout << glm::to_string(glm::fmat3(rotationDumb)) << std::endl; - std::cout << glm::to_string(glm::fmat3(rotationInvertedY )) << std::endl; + std::printf("%s\n", glm::to_string(glm::fmat3(rotationEuler)).c_str()); + std::printf("%s\n", glm::to_string(glm::fmat3(rotationDumb)).c_str()); + std::printf("%s\n", glm::to_string(glm::fmat3(rotationInvertedY)).c_str()); - std::cout <<"\nRESIDUAL\n"; - std::cout << glm::to_string(glm::fmat3(rotationEuler-(rotationDumb))) << std::endl; - std::cout << glm::to_string(glm::fmat3(rotationEuler-(rotationInvertedY ))) << std::endl; + std::printf("\nRESIDUAL\n"); + std::printf("%s\n", glm::to_string(glm::fmat3(rotationEuler-(rotationDumb))).c_str()); + std::printf("%s\n", glm::to_string(glm::fmat3(rotationEuler-(rotationInvertedY))).c_str()); return 0; } diff --git a/test/gtx/gtx_simd_mat4.cpp b/test/gtx/gtx_simd_mat4.cpp index d7a64638..615b69f2 100644 --- a/test/gtx/gtx_simd_mat4.cpp +++ b/test/gtx/gtx_simd_mat4.cpp @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/test/gtx/gtx_string_cast.cpp b/test/gtx/gtx_string_cast.cpp index e508a949..2d796b22 100644 --- a/test/gtx/gtx_string_cast.cpp +++ b/test/gtx/gtx_string_cast.cpp @@ -9,7 +9,6 @@ #include #include -#include #include int test_string_cast_vector() @@ -132,8 +131,6 @@ int main() Error += test_string_cast_vector(); Error += test_string_cast_matrix(); - printf("GNI"); - return Error; } diff --git a/test/gtx/gtx_vector_angle.cpp b/test/gtx/gtx_vector_angle.cpp index cc9a3323..94d38880 100644 --- a/test/gtx/gtx_vector_angle.cpp +++ b/test/gtx/gtx_vector_angle.cpp @@ -9,7 +9,6 @@ #include #include -#include #include int test_angle()