From 69622b29543bccefaaa3176531030345e7ac82eb Mon Sep 17 00:00:00 2001 From: Christophe Date: Fri, 12 Jul 2019 22:59:18 +0200 Subject: [PATCH] Fixed perf test results --- test/ext/ext_scalar_integer.cpp | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/test/ext/ext_scalar_integer.cpp b/test/ext/ext_scalar_integer.cpp index 41d67673..2917bf05 100644 --- a/test/ext/ext_scalar_integer.cpp +++ b/test/ext/ext_scalar_integer.cpp @@ -392,7 +392,7 @@ namespace nextMultiple for(std::size_t i = 0, n = Results.size(); i < n; ++i) Result += Results[i]; - return Result > 0; + return Result > 0 ? 0 : 1; } template @@ -422,7 +422,7 @@ namespace nextMultiple for(std::size_t i = 0, n = Results.size(); i < n; ++i) Result += Results[i]; - return Result > 0; + return Result > 0 ? 0 : 1; } template @@ -457,7 +457,7 @@ namespace nextMultiple for (std::size_t i = 0, n = Results.size(); i < n; ++i) Result += Results[i]; - return Result > 0; + return Result > 0 ? 0 : 1; } template @@ -486,7 +486,7 @@ namespace nextMultiple for (std::size_t i = 0, n = Results.size(); i < n; ++i) Result += Results[i]; - return Result > static_cast(0); + return Result > 0.0f ? 0 : 1; } template @@ -518,7 +518,7 @@ namespace nextMultiple for (std::size_t i = 0, n = Results.size(); i < n; ++i) Result += Results[i]; - return Result > static_cast(0); + return Result > 0.0f ? 0 : 1; } template @@ -592,10 +592,6 @@ namespace nextMultiple Error += test_uint(); Error += test_uint(); -# ifdef NDEBUG - Error += perf(); -# endif//NDEBUG - return Error; } }//namespace nextMultiple @@ -667,13 +663,13 @@ int main() Error += prevPowerOfTwo::test(); Error += nextPowerOfTwo::test(); Error += nextPowerOfTwo_advanced::test(); - -# ifdef NDEBUG - Error += nextPowerOfTwo_advanced::perf(); -# endif//NDEBUG - Error += prevMultiple::test(); Error += nextMultiple::test(); +# ifdef NDEBUG + Error += nextPowerOfTwo_advanced::perf(); + Error += nextMultiple::perf(); +# endif//NDEBUG + return Error; }