mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
Addressed some warnings (mostly MSVC)
This commit is contained in:
@@ -8,6 +8,11 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_EVALUATE_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_EVALUATE_HPP_INCLUDED
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4389) // '==' : signed/unsigned mismatch
|
||||
#endif
|
||||
|
||||
namespace Catch {
|
||||
namespace Internal {
|
||||
|
||||
@@ -28,6 +33,7 @@ namespace Internal {
|
||||
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.
|
||||
template<typename T1, typename T2, Operator Op>
|
||||
@@ -143,8 +149,12 @@ namespace Internal {
|
||||
template<Operator Op, typename T> bool compare( T* lhs, int rhs ) {
|
||||
return Evaluator<T*, T*, Op>::evaluate( lhs, reinterpret_cast<T*>( rhs ) );
|
||||
}
|
||||
|
||||
|
||||
} // end of namespace Internal
|
||||
} // end of namespace Catch
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // TWOBLUECUBES_CATCH_EVALUATE_HPP_INCLUDED
|
||||
|
@@ -102,6 +102,9 @@ namespace Catch {
|
||||
}
|
||||
|
||||
private:
|
||||
RunningTest( RunningTest const& );
|
||||
void operator=( RunningTest const& );
|
||||
|
||||
const TestCase& m_info;
|
||||
RunStatus m_runStatus;
|
||||
RunningSection m_rootSection;
|
||||
|
@@ -30,7 +30,7 @@ namespace Catch {
|
||||
WildcardAtEnd = 2,
|
||||
WildcardAtBothEnds = WildcardAtStart | WildcardAtEnd
|
||||
};
|
||||
|
||||
|
||||
public:
|
||||
TestCaseFilter( const std::string& testSpec, IfFilterMatches::DoWhat matchBehaviour = IfFilterMatches::AutoDetectBehaviour )
|
||||
: m_stringToMatch( toLower( testSpec ) ),
|
||||
|
@@ -26,6 +26,9 @@ namespace Catch {
|
||||
const unsigned int minorVersion;
|
||||
const unsigned int buildNumber;
|
||||
const std::string branchName;
|
||||
|
||||
private:
|
||||
void operator=( Version const& );
|
||||
};
|
||||
|
||||
extern Version libraryVersion;
|
||||
|
@@ -97,6 +97,7 @@ namespace Catch {
|
||||
private:
|
||||
|
||||
class AssertionPrinter {
|
||||
void operator= ( AssertionPrinter const& );
|
||||
public:
|
||||
AssertionPrinter( std::ostream& _stream, AssertionStats const& _stats )
|
||||
: stream( _stream ),
|
||||
|
Reference in New Issue
Block a user