Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Removed copy ctor, assignment operator and swap from TestCaseInfo

Commit
41afd0c3d44c83c5754dbe0a8713a54efe9c699c
Author
Phil Nash ·
Parents
602b62f03797

Files · Download .tar.gz

Changes

 include/internal/catch_test_case_info.h   |  5 -----
 include/internal/catch_test_case_info.hpp | 32 -------------------------------
 2 files changed, 37 deletions(-)

diff --git a/include/internal/catch_test_case_info.h b/include/internal/catch_test_case_info.h
index b821abd3..08519c5c 100644
--- a/include/internal/catch_test_case_info.h
+++ b/include/internal/catch_test_case_info.h
@@ -39,8 +39,6 @@ namespace Catch {
                         std::set<std::string> const& _tags,
                         SourceLineInfo const& _lineInfo );
 
-        TestCaseInfo( TestCaseInfo const& other );
-
         friend void setTags( TestCaseInfo& testCaseInfo, std::set<std::string> const& tags );
 
         bool isHidden() const;
@@ -62,7 +60,6 @@ namespace Catch {
     public:
 
         TestCase( ITestCase* testCase, TestCaseInfo const& info );
-        TestCase( TestCase const& other );
 
         TestCase withName( std::string const& _newName ) const;
 
@@ -70,10 +67,8 @@ namespace Catch {
 
         TestCaseInfo const& getTestCaseInfo() const;
 
-        void swap( TestCase& other );
         bool operator == ( TestCase const& other ) const;
         bool operator < ( TestCase const& other ) const;
-        TestCase& operator = ( TestCase const& other );
 
     private:
         Ptr<ITestCase> test;
diff --git a/include/internal/catch_test_case_info.hpp b/include/internal/catch_test_case_info.hpp
index 1c73699b..0ee14c82 100644
--- a/include/internal/catch_test_case_info.hpp
+++ b/include/internal/catch_test_case_info.hpp
@@ -122,17 +122,6 @@ namespace Catch {
         setTags( *this, _tags );
     }
 
-    TestCaseInfo::TestCaseInfo( TestCaseInfo const& other )
-    :   name( other.name ),
-        className( other.className ),
-        description( other.description ),
-        tags( other.tags ),
-        lcaseTags( other.lcaseTags ),
-        tagsAsString( other.tagsAsString ),
-        lineInfo( other.lineInfo ),
-        properties( other.properties )
-    {}
-
     bool TestCaseInfo::isHidden() const {
         return ( properties & IsHidden ) != 0;
     }
@@ -149,10 +138,6 @@ namespace Catch {
 
     TestCase::TestCase( ITestCase* testCase, TestCaseInfo const& info ) : TestCaseInfo( info ), test( testCase ) {}
 
-    TestCase::TestCase( TestCase const& other )
-    :   TestCaseInfo( other ),
-        test( other.test )
-    {}
 
     TestCase TestCase::withName( std::string const& _newName ) const {
         TestCase other( *this );
@@ -160,18 +145,6 @@ namespace Catch {
         return other;
     }
 
-    void TestCase::swap( TestCase& other ) {
-        test.swap( other.test );
-        name.swap( other.name );
-        className.swap( other.className );
-        description.swap( other.description );
-        tags.swap( other.tags );
-        lcaseTags.swap( other.lcaseTags );
-        tagsAsString.swap( other.tagsAsString );
-        std::swap( TestCaseInfo::properties, static_cast<TestCaseInfo&>( other ).properties );
-        std::swap( lineInfo, other.lineInfo );
-    }
-
     void TestCase::invoke() const {
         test->invoke();
     }
@@ -185,11 +158,6 @@ namespace Catch {
     bool TestCase::operator < ( TestCase const& other ) const {
         return name < other.name;
     }
-    TestCase& TestCase::operator = ( TestCase const& other ) {
-        TestCase temp( other );
-        swap( temp );
-        return *this;
-    }
 
     TestCaseInfo const& TestCase::getTestCaseInfo() const
     {