mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-19 03:15:40 +02:00
Conditionally removes usage of deprecated features
-add macros to test for C++ version and features to catch_compiler_capabilities.hpp - replaces dynamic exception specifications (deprecated) with noexcept in C++ Version >= 11 - defines defaulted copy constructor/move constructors/assignment in C++ Version >= 11 since their implicit generation is deprecated under some circumstances. - fixes #259
This commit is contained in:
@@ -114,6 +114,13 @@ namespace Catch
|
||||
}
|
||||
virtual ~AssertionStats();
|
||||
|
||||
# ifdef CATCH_CPP11_OR_GREATER
|
||||
AssertionStats( AssertionStats const& ) = default;
|
||||
AssertionStats( AssertionStats && ) = default;
|
||||
AssertionStats& operator = ( AssertionStats const& ) = default;
|
||||
AssertionStats& operator = ( AssertionStats && ) = default;
|
||||
# endif
|
||||
|
||||
AssertionResult assertionResult;
|
||||
std::vector<MessageInfo> infoMessages;
|
||||
Totals totals;
|
||||
@@ -130,6 +137,12 @@ namespace Catch
|
||||
missingAssertions( _missingAssertions )
|
||||
{}
|
||||
virtual ~SectionStats();
|
||||
# ifdef CATCH_CPP11_OR_GREATER
|
||||
SectionStats( SectionStats const& ) = default;
|
||||
SectionStats( SectionStats && ) = default;
|
||||
SectionStats& operator = ( SectionStats const& ) = default;
|
||||
SectionStats& operator = ( SectionStats && ) = default;
|
||||
# endif
|
||||
|
||||
SectionInfo sectionInfo;
|
||||
Counts assertions;
|
||||
@@ -151,6 +164,13 @@ namespace Catch
|
||||
{}
|
||||
virtual ~TestCaseStats();
|
||||
|
||||
# ifdef CATCH_CPP11_OR_GREATER
|
||||
TestCaseStats( TestCaseStats const& ) = default;
|
||||
TestCaseStats( TestCaseStats && ) = default;
|
||||
TestCaseStats& operator = ( TestCaseStats const& ) = default;
|
||||
TestCaseStats& operator = ( TestCaseStats && ) = default;
|
||||
# endif
|
||||
|
||||
TestCaseInfo testInfo;
|
||||
Totals totals;
|
||||
std::string stdOut;
|
||||
@@ -172,6 +192,13 @@ namespace Catch
|
||||
{}
|
||||
virtual ~TestGroupStats();
|
||||
|
||||
# ifdef CATCH_CPP11_OR_GREATER
|
||||
TestGroupStats( TestGroupStats const& ) = default;
|
||||
TestGroupStats( TestGroupStats && ) = default;
|
||||
TestGroupStats& operator = ( TestGroupStats const& ) = default;
|
||||
TestGroupStats& operator = ( TestGroupStats && ) = default;
|
||||
# endif
|
||||
|
||||
GroupInfo groupInfo;
|
||||
Totals totals;
|
||||
bool aborting;
|
||||
@@ -185,12 +212,20 @@ namespace Catch
|
||||
totals( _totals ),
|
||||
aborting( _aborting )
|
||||
{}
|
||||
virtual ~TestRunStats();
|
||||
|
||||
# ifndef CATCH_CPP11_OR_GREATER
|
||||
TestRunStats( TestRunStats const& _other )
|
||||
: runInfo( _other.runInfo ),
|
||||
totals( _other.totals ),
|
||||
aborting( _other.aborting )
|
||||
{}
|
||||
virtual ~TestRunStats();
|
||||
# else
|
||||
TestRunStats( TestRunStats const& ) = default;
|
||||
TestRunStats( TestRunStats && ) = default;
|
||||
TestRunStats& operator = ( TestRunStats const& ) = default;
|
||||
TestRunStats& operator = ( TestRunStats && ) = default;
|
||||
# endif
|
||||
|
||||
TestRunInfo runInfo;
|
||||
Totals totals;
|
||||
|
Reference in New Issue
Block a user