From 41afd0c3d44c83c5754dbe0a8713a54efe9c699c Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Tue, 25 Apr 2017 20:17:37 +0100 Subject: [PATCH] Removed copy ctor, assignment operator and swap from TestCaseInfo --- 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 const& _tags, SourceLineInfo const& _lineInfo ); - TestCaseInfo( TestCaseInfo const& other ); - friend void setTags( TestCaseInfo& testCaseInfo, std::set 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 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( 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 {