From 166c75afec9650904bace3e5e872a5c76217f629 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Mon, 19 Sep 2011 23:05:29 +0100 Subject: [PATCH] Fixed packing tests --- test/core/core_func_packing.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/core/core_func_packing.cpp b/test/core/core_func_packing.cpp index 3f3006cf..7676f975 100644 --- a/test/core/core_func_packing.cpp +++ b/test/core/core_func_packing.cpp @@ -124,7 +124,9 @@ int test_packHalf2x16() glm::vec2 B(A[i]); glm::uint C = glm::packHalf2x16(B); glm::vec2 D = glm::unpackHalf2x16(C); - Error += B == D ? 0 : 1; + //Error += B == D ? 0 : 1; + Error += glm::all(glm::equalEpsilon(B, D, 1.0f / 127.f)) ? 0 : 1; + assert(!Error); } return Error; @@ -145,6 +147,7 @@ int test_packDouble2x32() double C = glm::packDouble2x32(B); glm::u32vec2 D = glm::unpackDouble2x32(C); Error += B == D ? 0 : 1; + assert(!Error); } return Error;