Skip to content

Commit

Permalink
Fixed perf test results
Browse files Browse the repository at this point in the history
  • Loading branch information
Christophe committed Jul 12, 2019
1 parent cb9cd7c commit 69622b2
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions test/ext/ext_scalar_integer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <typename T>
Expand Down Expand Up @@ -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 <typename T>
Expand Down Expand Up @@ -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 <typename T>
Expand Down Expand Up @@ -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<float>(0);
return Result > 0.0f ? 0 : 1;
}

template <typename T>
Expand Down Expand Up @@ -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<float>(0);
return Result > 0.0f ? 0 : 1;
}

template<typename genIUType>
Expand Down Expand Up @@ -592,10 +592,6 @@ namespace nextMultiple
Error += test_uint<glm::uint32>();
Error += test_uint<glm::uint64>();

# ifdef NDEBUG
Error += perf();
# endif//NDEBUG

return Error;
}
}//namespace nextMultiple
Expand Down Expand Up @@ -667,13 +663,13 @@ int main()
Error += prevPowerOfTwo::test();
Error += nextPowerOfTwo::test();
Error += nextPowerOfTwo_advanced::test();

Error += prevMultiple::test();
Error += nextMultiple::test();

# ifdef NDEBUG
Error += nextPowerOfTwo_advanced::perf();
Error += nextMultiple::perf();
# endif//NDEBUG

Error += prevMultiple::test();
Error += nextMultiple::test();

return Error;
}

0 comments on commit 69622b2

Please sign in to comment.