From 3a8cfda2c2f802b1d7922ecfdee5c522d920baea Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Tue, 3 May 2016 19:16:31 +0100 Subject: [PATCH] Fixed floating point hashes --- test/test_hash.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/test/test_hash.cpp b/test/test_hash.cpp index 1487c806..79a9fe8a 100644 --- a/test/test_hash.cpp +++ b/test/test_hash.cpp @@ -148,10 +148,7 @@ namespace { size_t hash = etl::hash()((float)(1.2345)); - if (sizeof(size_t) == sizeof(long long)) - CHECK_EQUAL(0x884B5E3F478AF88F, hash); - else - CHECK_EQUAL(0x3F9E0419, hash); + CHECK_EQUAL(0X3F9E0419, hash); } //************************************************************************* @@ -159,8 +156,8 @@ namespace { size_t hash = etl::hash()((double)(1.2345)); - if (sizeof(size_t) == sizeof(long long)) - CHECK_EQUAL(0x3FF3C083126E978D, hash); + if (sizeof(size_t) == sizeof(double)) + CHECK_EQUAL(0X3FF3C083126E978D, hash); else CHECK_EQUAL(0x86FBF224, hash); }