Fixes for MSVC
This commit is contained in:
10
test/test.h
10
test/test.h
@@ -72,13 +72,17 @@ inline void __fennec_test_run(const std::string& expression, const ResultT resul
|
||||
if constexpr(is_arithmetic_v<ResultT>)
|
||||
{
|
||||
passed = result == expected;
|
||||
passed |= fennec::abs(expected - result) <= numeric_limits<ResultT>::epsilon();
|
||||
|
||||
if constexpr(not is_bool_v<ResultT>)
|
||||
passed |= fennec::abs(expected - result) <= numeric_limits<ResultT>::epsilon();
|
||||
}
|
||||
// Check non-boolean vector values
|
||||
else if constexpr(is_vector_v<ResultT> && not(is_bool_v<typename ResultT::scalar_t>))
|
||||
else if constexpr(is_vector_v<ResultT>)
|
||||
{
|
||||
passed = result == expected;
|
||||
passed |= fennec::all(fennec::lessThanEqual(fennec::abs(expected - result), ResultT(numeric_limits<typename ResultT::scalar_t>::epsilon())));
|
||||
|
||||
if constexpr(not is_bool_v<typename ResultT::scalar_t>)
|
||||
passed |= fennec::all(fennec::lessThanEqual(fennec::abs(expected - result), ResultT(numeric_limits<typename ResultT::scalar_t>::epsilon())));
|
||||
}
|
||||
// Base Case, simple comparison
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user