mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-25 22:19:25 +00:00
Added copy actor and operator = back to TestCaseInfo
This commit is contained in:
parent
d5fbe2ec5d
commit
c2675b5d49
2 changed files with 14 additions and 0 deletions
|
@ -36,6 +36,13 @@ namespace Catch {
|
|||
m_lineInfo( other.m_lineInfo )
|
||||
{}
|
||||
|
||||
TestCaseInfo::TestCaseInfo( const TestCaseInfo& other )
|
||||
: m_test( other.m_test ),
|
||||
m_name( other.m_name ),
|
||||
m_description( other.m_description ),
|
||||
m_lineInfo( other.m_lineInfo )
|
||||
{}
|
||||
|
||||
void TestCaseInfo::invoke() const {
|
||||
m_test->invoke();
|
||||
}
|
||||
|
@ -70,6 +77,11 @@ namespace Catch {
|
|||
bool TestCaseInfo::operator < ( const TestCaseInfo& other ) const {
|
||||
return m_name < other.m_name;
|
||||
}
|
||||
TestCaseInfo& TestCaseInfo::operator = ( const TestCaseInfo& other ) {
|
||||
TestCaseInfo temp( other );
|
||||
swap( temp );
|
||||
return *this;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // TWOBLUECUBES_CATCH_TESTCASEINFO_HPP_INCLUDED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue