mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 20:27:11 +01:00 
			
		
		
		
	Removed templates from Approx (just uses double)
This commit is contained in:
		| @@ -36,8 +36,6 @@ print "// This file has been merged from multiple headers. Please don't edit it | |||||||
| print | print | ||||||
| print '#ifndef TWOBLUECUBES_CATCH_HPP_INCLUDED' | print '#ifndef TWOBLUECUBES_CATCH_HPP_INCLUDED' | ||||||
| print '#define TWOBLUECUBES_CATCH_HPP_INCLUDED' | print '#define TWOBLUECUBES_CATCH_HPP_INCLUDED' | ||||||
|  |  | ||||||
| parseFile( rootPath, 'catch.hpp' ) | parseFile( rootPath, 'catch.hpp' ) | ||||||
|  |  | ||||||
| print '#endif // TWOBLUECUBES_CATCH_HPP_INCLUDED' | print '#endif // TWOBLUECUBES_CATCH_HPP_INCLUDED' | ||||||
| print | print | ||||||
|   | |||||||
| @@ -36,10 +36,9 @@ namespace Catch | |||||||
|             } |             } | ||||||
|              |              | ||||||
|             /////////////////////////////////////////////////////////////////////////// |             /////////////////////////////////////////////////////////////////////////// | ||||||
|             template<typename T> |  | ||||||
|             friend bool operator ==  |             friend bool operator ==  | ||||||
|             ( |             ( | ||||||
|                 const T& lhs,  |                 double lhs, | ||||||
|                 const Approx& rhs |                 const Approx& rhs | ||||||
|             ) |             ) | ||||||
|             { |             { | ||||||
| @@ -48,21 +47,19 @@ namespace Catch | |||||||
|             } |             } | ||||||
|              |              | ||||||
|             /////////////////////////////////////////////////////////////////////////// |             /////////////////////////////////////////////////////////////////////////// | ||||||
|             template<typename T> |  | ||||||
|             friend bool operator ==  |             friend bool operator ==  | ||||||
|             ( |             ( | ||||||
|                 const Approx& lhs, |                 const Approx& lhs, | ||||||
|                 const T& rhs |                 double rhs | ||||||
|             ) |             ) | ||||||
|             { |             { | ||||||
|                 return operator==( rhs, lhs ); |                 return operator==( rhs, lhs ); | ||||||
|             } |             } | ||||||
|              |              | ||||||
|             /////////////////////////////////////////////////////////////////////////// |             /////////////////////////////////////////////////////////////////////////// | ||||||
|             template<typename T> |  | ||||||
|             friend bool operator !=  |             friend bool operator !=  | ||||||
|             ( |             ( | ||||||
|                 const T& lhs,  |                 double lhs,  | ||||||
|                 const Approx& rhs |                 const Approx& rhs | ||||||
|             ) |             ) | ||||||
|             { |             { | ||||||
| @@ -70,11 +67,10 @@ namespace Catch | |||||||
|             } |             } | ||||||
|  |  | ||||||
|             /////////////////////////////////////////////////////////////////////////// |             /////////////////////////////////////////////////////////////////////////// | ||||||
|             template<typename T> |  | ||||||
|             friend bool operator !=  |             friend bool operator !=  | ||||||
|             ( |             ( | ||||||
|                 const Approx& lhs, |                 const Approx& lhs, | ||||||
|                 const T& rhs |                 double rhs | ||||||
|             ) |             ) | ||||||
|             { |             { | ||||||
|                 return !operator==( rhs, lhs ); |                 return !operator==( rhs, lhs ); | ||||||
|   | |||||||
| @@ -25,7 +25,6 @@ | |||||||
|     Finish macros, listed here, later (just CHECK_NOFAIL now) |     Finish macros, listed here, later (just CHECK_NOFAIL now) | ||||||
|  */ |  */ | ||||||
| #define TWOBLUECUBES_CATCH_HPP_INCLUDED | #define TWOBLUECUBES_CATCH_HPP_INCLUDED | ||||||
|  |  | ||||||
| // #included from: internal/catch_hub.h | // #included from: internal/catch_hub.h | ||||||
|  |  | ||||||
| /* | /* | ||||||
| @@ -2388,10 +2387,9 @@ namespace Catch | |||||||
|             } |             } | ||||||
|  |  | ||||||
|             /////////////////////////////////////////////////////////////////////////// |             /////////////////////////////////////////////////////////////////////////// | ||||||
|             template<typename T> |  | ||||||
|             friend bool operator == |             friend bool operator == | ||||||
|             ( |             ( | ||||||
|                 const T& lhs, |                 double lhs, | ||||||
|                 const Approx& rhs |                 const Approx& rhs | ||||||
|             ) |             ) | ||||||
|             { |             { | ||||||
| @@ -2400,21 +2398,19 @@ namespace Catch | |||||||
|             } |             } | ||||||
|  |  | ||||||
|             /////////////////////////////////////////////////////////////////////////// |             /////////////////////////////////////////////////////////////////////////// | ||||||
|             template<typename T> |  | ||||||
|             friend bool operator == |             friend bool operator == | ||||||
|             ( |             ( | ||||||
|                 const Approx& lhs, |                 const Approx& lhs, | ||||||
|                 const T& rhs |                 double rhs | ||||||
|             ) |             ) | ||||||
|             { |             { | ||||||
|                 return operator==( rhs, lhs ); |                 return operator==( rhs, lhs ); | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             /////////////////////////////////////////////////////////////////////////// |             /////////////////////////////////////////////////////////////////////////// | ||||||
|             template<typename T> |  | ||||||
|             friend bool operator != |             friend bool operator != | ||||||
|             ( |             ( | ||||||
|                 const T& lhs, |                 double lhs, | ||||||
|                 const Approx& rhs |                 const Approx& rhs | ||||||
|             ) |             ) | ||||||
|             { |             { | ||||||
| @@ -2422,11 +2418,10 @@ namespace Catch | |||||||
|             } |             } | ||||||
|  |  | ||||||
|             /////////////////////////////////////////////////////////////////////////// |             /////////////////////////////////////////////////////////////////////////// | ||||||
|             template<typename T> |  | ||||||
|             friend bool operator != |             friend bool operator != | ||||||
|             ( |             ( | ||||||
|                 const Approx& lhs, |                 const Approx& lhs, | ||||||
|                 const T& rhs |                 double rhs | ||||||
|             ) |             ) | ||||||
|             { |             { | ||||||
|                 return !operator==( rhs, lhs ); |                 return !operator==( rhs, lhs ); | ||||||
| @@ -5925,6 +5920,9 @@ int main (int argc, char * const argv[]) | |||||||
| #import <objc/runtime.h> | #import <objc/runtime.h> | ||||||
| #include <string> | #include <string> | ||||||
|  |  | ||||||
|  | // NB. Any general catch headers included here must be included | ||||||
|  | // in catch.hpp first to make sure they are included by the single | ||||||
|  | // header for non obj-usage | ||||||
|  |  | ||||||
| /////////////////////////////////////////////////////////////////////////////// | /////////////////////////////////////////////////////////////////////////////// | ||||||
| // This protocol is really only here for (self) documenting purposes, since | // This protocol is really only here for (self) documenting purposes, since | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Phil Nash
					Phil Nash