From d779fc7892cdb6e04acb262f63943845544adb29 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Mon, 11 Jul 2011 09:52:03 +0100 Subject: [PATCH] Added GTC_half_float tests --- test/core/core_type_float.cpp | 6 ++ test/gtc/gtc_half_float.cpp | 101 ++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+) diff --git a/test/core/core_type_float.cpp b/test/core/core_type_float.cpp index ff9cb5f4..8e79024e 100644 --- a/test/core/core_type_float.cpp +++ b/test/core/core_type_float.cpp @@ -24,12 +24,18 @@ int test_float_precision() sizeof(glm::mediump_float) <= sizeof(glm::highp_float)) ? 0 : 1; } +int test_vec2() +{ + glm +} + int main() { int Error = 0; Error += test_float_size(); Error += test_float_precision(); + Error += test_vec2(); return Error; } diff --git a/test/gtc/gtc_half_float.cpp b/test/gtc/gtc_half_float.cpp index 92b968b0..ef208c1d 100644 --- a/test/gtc/gtc_half_float.cpp +++ b/test/gtc/gtc_half_float.cpp @@ -78,10 +78,111 @@ int test_half_ctor_mat2x2() return Error; } +int test_half_ctor_mat2x3() +{ + int Error = 0; + + return Error; +} + +int test_half_ctor_mat2x4() +{ + int Error = 0; + + return Error; +} + +int test_half_ctor_mat3x2() +{ + int Error = 0; + + return Error; +} + +int test_half_ctor_mat3x3() +{ + int Error = 0; + + return Error; +} + +int test_half_ctor_mat3x4() +{ + int Error = 0; + + return Error; +} + +int test_half_ctor_mat4x2() +{ + int Error = 0; + + return Error; +} + +int test_half_ctor_mat4x3() +{ + int Error = 0; + + return Error; +} + +int test_half_ctor_mat4x4() +{ + int Error = 0; + + return Error; +} + +int test_half_ctor_vec2() +{ + int Error = 0; + + { + glm::hvec2 A(1, 2); + glm::hvec2 B(A); + glm::vec2 C(1, 2); + glm::hvec2 D(C); + glm::dvec2 E(1, 2); + glm::hvec2 F(E); + glm::hvec2 G(1, 2.0); + glm::hvec2 H; + H = A; + + Error += A == B ? 0 : 1; + Error += C == D ? 0 : 1; + Error += E == F ? 0 : 1; + Error += A == G ? 0 : 1; + Error += A == H ? 0 : 1; + } + + { + glm::hvec2 A(1); + glm::vec2 B(1); + + Error += A == B ? 0 : 1; + } + + return Error; +} + +int test_half_ctor_vec3() +{ + +} + +int test_half_ctor_vec4() +{ + +} + int main() { int Error = 0; + Error += test_half_ctor_vec2(); + Error += test_half_ctor_vec3(); + Error += test_half_ctor_vec4(); Error += test_half_ctor_mat2x2(); Error += test_half_precision_scalar(); Error += test_half_precision_vec();