Removed templates from Approx (just uses double)

This commit is contained in:
Phil Nash 2011-05-31 07:51:04 +01:00
parent 89d1e6c4f1
commit 6b6143ccd4
3 changed files with 11 additions and 19 deletions

View File

@ -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

View File

@ -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 );

View File

@ -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