Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Changed 'auto' into 'bool' for C++98 compatibility

Commit
3523c39f44c855c1d6f0d7ef3d3a3ea12d4a8987
Author
CNugteren ·
Parents
2585d280d1e0

Files · Download .tar.gz

Changes

 include/internal/catch_approx.hpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/internal/catch_approx.hpp b/include/internal/catch_approx.hpp
index 5dd7df8e..08a15b71 100644
--- a/include/internal/catch_approx.hpp
+++ b/include/internal/catch_approx.hpp
@@ -46,11 +46,11 @@ namespace Detail {
 
         friend bool operator == ( double lhs, Approx const& rhs ) {
             // Thanks to Richard Harris for his help refining this formula
-            auto relativeOK = fabs( lhs - rhs.m_value ) < rhs.m_epsilon * (rhs.m_scale + (std::max)( fabs(lhs), fabs(rhs.m_value) ) );
+            bool relativeOK = fabs( lhs - rhs.m_value ) < rhs.m_epsilon * (rhs.m_scale + (std::max)( fabs(lhs), fabs(rhs.m_value) ) );
             if ( relativeOK ) {
                 return true;
             }
-            auto absoluteOK = fabs( lhs - rhs.m_value ) < rhs.m_margin;
+            bool absoluteOK = fabs( lhs - rhs.m_value ) < rhs.m_margin;
             return absoluteOK;
         }