Removed copy ctor, assignment operator and swap from TestCaseInfo

This commit is contained in:
Phil Nash 2017-04-25 20:17:37 +01:00
parent 602b62f037
commit 41afd0c3d4
2 changed files with 0 additions and 37 deletions

View File

@ -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;

View File

@ -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
{