From 675391d07f50d0067e7bab983433c6d86f5f8256 Mon Sep 17 00:00:00 2001 From: jjesswan Date: Tue, 7 May 2024 06:03:03 -0400 Subject: remove glm --- glm-master/test/ext/ext_vector_integer_sized.cpp | 216 ----------------------- 1 file changed, 216 deletions(-) delete mode 100644 glm-master/test/ext/ext_vector_integer_sized.cpp (limited to 'glm-master/test/ext/ext_vector_integer_sized.cpp') diff --git a/glm-master/test/ext/ext_vector_integer_sized.cpp b/glm-master/test/ext/ext_vector_integer_sized.cpp deleted file mode 100644 index 52b3f4e..0000000 --- a/glm-master/test/ext/ext_vector_integer_sized.cpp +++ /dev/null @@ -1,216 +0,0 @@ -#include -#include -#include -#include -#include - -template -static int test_operators() -{ - int Error = 0; - - { - genType const A(1); - genType const B(1); - - bool const R = A != B; - bool const S = A == B; - Error += (S && !R) ? 0 : 1; - } - - { - genType const A(1); - genType const B(1); - - genType const C = A + B; - Error += C == genType(2) ? 0 : 1; - - genType const D = A - B; - Error += D == genType(0) ? 0 : 1; - - genType const E = A * B; - Error += E == genType(1) ? 0 : 1; - - genType const F = A / B; - Error += F == genType(1) ? 0 : 1; - } - - { - genType const A(3); - genType const B(2); - - genType const C = A % B; - Error += C == genType(1) ? 0 : 1; - } - - { - genType const A(1); - genType const B(1); - genType const C(0); - - genType const I = A & B; - Error += I == genType(1) ? 0 : 1; - genType const D = A & C; - Error += D == genType(0) ? 0 : 1; - - genType const E = A | B; - Error += E == genType(1) ? 0 : 1; - genType const F = A | C; - Error += F == genType(1) ? 0 : 1; - - genType const G = A ^ B; - Error += G == genType(0) ? 0 : 1; - genType const H = A ^ C; - Error += H == genType(1) ? 0 : 1; - } - - { - genType const A(0); - genType const B(1); - genType const C(2); - - genType const D = B << B; - Error += D == genType(2) ? 0 : 1; - genType const E = C >> B; - Error += E == genType(1) ? 0 : 1; - } - - return Error; -} - -template -static int test_ctor() -{ - typedef typename genType::value_type T; - - int Error = 0; - - genType const A = genType(1); - - genType const E(genType(1)); - Error += A == E ? 0 : 1; - - genType const F(E); - Error += A == F ? 0 : 1; - - genType const B = genType(1); - genType const G(glm::vec<2, T>(1)); - Error += B == G ? 0 : 1; - - genType const H(glm::vec<3, T>(1)); - Error += B == H ? 0 : 1; - - genType const I(glm::vec<4, T>(1)); - Error += B == I ? 0 : 1; - - return Error; -} - -template -static int test_size() -{ - int Error = 0; - - Error += sizeof(typename genType::value_type) == sizeof(genType) ? 0 : 1; - Error += genType().length() == 1 ? 0 : 1; - Error += genType::length() == 1 ? 0 : 1; - - return Error; -} - -template -static int test_relational() -{ - int Error = 0; - - genType const A(1); - genType const B(1); - genType const C(0); - - Error += A == B ? 0 : 1; - Error += A != C ? 0 : 1; - Error += all(equal(A, B)) ? 0 : 1; - Error += any(notEqual(A, C)) ? 0 : 1; - - return Error; -} - -template -static int test_constexpr() -{ -# if GLM_CONFIG_CONSTEXP == GLM_ENABLE - static_assert(genType::length() == 1, "GLM: Failed constexpr"); - static_assert(genType(1)[0] == 1, "GLM: Failed constexpr"); - static_assert(genType(1) == genType(1), "GLM: Failed constexpr"); - static_assert(genType(1) != genType(0), "GLM: Failed constexpr"); -# endif - - return 0; -} - -int main() -{ - int Error = 0; - - Error += test_operators(); - Error += test_operators(); - Error += test_operators(); - Error += test_operators(); - Error += test_operators(); - - Error += test_ctor(); - Error += test_ctor(); - Error += test_ctor(); - Error += test_ctor(); - Error += test_ctor(); - - Error += test_size(); - Error += test_size(); - Error += test_size(); - Error += test_size(); - Error += test_size(); - - Error += test_relational(); - Error += test_relational(); - Error += test_relational(); - Error += test_relational(); - Error += test_relational(); - - Error += test_constexpr(); - Error += test_constexpr(); - Error += test_constexpr(); - Error += test_constexpr(); - Error += test_constexpr(); - - Error += test_operators(); - Error += test_operators(); - Error += test_operators(); - Error += test_operators(); - Error += test_operators(); - - Error += test_ctor(); - Error += test_ctor(); - Error += test_ctor(); - Error += test_ctor(); - Error += test_ctor(); - - Error += test_size(); - Error += test_size(); - Error += test_size(); - Error += test_size(); - Error += test_size(); - - Error += test_relational(); - Error += test_relational(); - Error += test_relational(); - Error += test_relational(); - Error += test_relational(); - - Error += test_constexpr(); - Error += test_constexpr(); - Error += test_constexpr(); - Error += test_constexpr(); - Error += test_constexpr(); - - return Error; -} -- cgit v1.2.3-70-g09d2