From 8b7d3daa349857c7ecd61d0afb240337003a83b5 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Mon, 28 Jul 2014 23:46:46 +0200 Subject: [PATCH] Added vec1 operator tests --- test/core/core_type_vec1.cpp | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/test/core/core_type_vec1.cpp b/test/core/core_type_vec1.cpp index f76578dc..0b773012 100644 --- a/test/core/core_type_vec1.cpp +++ b/test/core/core_type_vec1.cpp @@ -12,12 +12,30 @@ int test_operators() { - glm::vec4 A(1.0f); - glm::vec4 B(1.0f); - bool R = A != B; - bool S = A == B; + int Error(0); - return (S && !R) ? 0 : 1; + glm::vec1 A(1.0f); + glm::vec1 B(1.0f); + { + bool R = A != B; + bool S = A == B; + + Error += (S && !R) ? 0 : 1; + } + + { + A *= 1.0f; + B *= 1.0; + A += 1.0f; + B += 1.0; + + bool R = A != B; + bool S = A == B; + + Error += (S && !R) ? 0 : 1; + } + + return Error; } int test_operator_increment()