mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-28 07:29:25 +00:00
Fix case sensitivity when matching tags
(now insensitive again) Also group case-different tags together when listing
This commit is contained in:
parent
e21d0b29cc
commit
fbf3f6f879
4 changed files with 46 additions and 21 deletions
|
@ -102,6 +102,7 @@ namespace Catch {
|
|||
oss << "[" << *it << "]";
|
||||
if( *it == "!throws" )
|
||||
throws = true;
|
||||
lcaseTags.insert( toLower( *it ) );
|
||||
}
|
||||
tagsAsString = oss.str();
|
||||
}
|
||||
|
@ -111,6 +112,7 @@ namespace Catch {
|
|||
className( other.className ),
|
||||
description( other.description ),
|
||||
tags( other.tags ),
|
||||
lcaseTags( other.lcaseTags ),
|
||||
tagsAsString( other.tagsAsString ),
|
||||
lineInfo( other.lineInfo ),
|
||||
isHidden( other.isHidden ),
|
||||
|
@ -130,6 +132,19 @@ 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::isHidden, static_cast<TestCaseInfo&>( other ).isHidden );
|
||||
std::swap( TestCaseInfo::throws, static_cast<TestCaseInfo&>( other ).throws );
|
||||
std::swap( lineInfo, other.lineInfo );
|
||||
}
|
||||
|
||||
void TestCase::invoke() const {
|
||||
test->invoke();
|
||||
}
|
||||
|
@ -141,14 +156,6 @@ namespace Catch {
|
|||
return TestCaseInfo::throws;
|
||||
}
|
||||
|
||||
void TestCase::swap( TestCase& other ) {
|
||||
test.swap( other.test );
|
||||
className.swap( other.className );
|
||||
name.swap( other.name );
|
||||
description.swap( other.description );
|
||||
std::swap( lineInfo, other.lineInfo );
|
||||
}
|
||||
|
||||
bool TestCase::operator == ( TestCase const& other ) const {
|
||||
return test.get() == other.test.get() &&
|
||||
name == other.name &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue