mirror of
https://github.com/catchorg/Catch2.git
synced 2025-11-04 22:19:34 +01:00
Context methods are non-static - accessed via interface
This is a move towards allowing multiple contexts - with the concept of a (possibly thread local) "current" context
This commit is contained in:
@@ -20,26 +20,13 @@ namespace Internal {
|
||||
IsGreaterThanOrEqualTo
|
||||
};
|
||||
|
||||
template<Operator Op>
|
||||
struct OperatorTraits{ static const char* getName(){ return "*error - unknown operator*"; } };
|
||||
|
||||
template<>
|
||||
struct OperatorTraits<IsEqualTo>{ static const char* getName(){ return "=="; } };
|
||||
|
||||
template<>
|
||||
struct OperatorTraits<IsNotEqualTo>{ static const char* getName(){ return "!="; } };
|
||||
|
||||
template<>
|
||||
struct OperatorTraits<IsLessThan>{ static const char* getName(){ return "<"; } };
|
||||
|
||||
template<>
|
||||
struct OperatorTraits<IsGreaterThan>{ static const char* getName(){ return ">"; } };
|
||||
|
||||
template<>
|
||||
struct OperatorTraits<IsLessThanOrEqualTo>{ static const char* getName(){ return "<="; } };
|
||||
|
||||
template<>
|
||||
struct OperatorTraits<IsGreaterThanOrEqualTo>{ static const char* getName(){ return ">="; } };
|
||||
template<Operator Op> struct OperatorTraits { static const char* getName(){ return "*error*"; } };
|
||||
template<> struct OperatorTraits<IsEqualTo> { static const char* getName(){ return "=="; } };
|
||||
template<> struct OperatorTraits<IsNotEqualTo> { static const char* getName(){ return "!="; } };
|
||||
template<> struct OperatorTraits<IsLessThan> { static const char* getName(){ return "<"; } };
|
||||
template<> struct OperatorTraits<IsGreaterThan> { static const char* getName(){ return ">"; } };
|
||||
template<> struct OperatorTraits<IsLessThanOrEqualTo> { static const char* getName(){ return "<="; } };
|
||||
template<> struct OperatorTraits<IsGreaterThanOrEqualTo>{ static const char* getName(){ return ">="; } };
|
||||
|
||||
// So the compare overloads can be operator agnostic we convey the operator as a template
|
||||
// enum, which is used to specialise an Evaluator for doing the comparison.
|
||||
|
||||
Reference in New Issue
Block a user