mirror of
https://github.com/catchorg/Catch2.git
synced 2025-06-05 23:10:48 +00:00
Tag and test case name querying are now case insensitive
This commit is contained in:
parent
d78cfe1275
commit
17479c6e49
4 changed files with 17 additions and 5 deletions
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include "catch_test_case_info.h"
|
||||
#include "catch_tags.hpp"
|
||||
#include "catch_common.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@ -36,6 +37,8 @@ namespace Catch {
|
|||
m_filterType( matchBehaviour ),
|
||||
m_wildcardPosition( NoWildcard )
|
||||
{
|
||||
toLower( m_stringToMatch );
|
||||
|
||||
if( m_filterType == IfFilterMatches::AutoDetectBehaviour ) {
|
||||
if( startsWith( m_stringToMatch, "exclude:" ) ) {
|
||||
m_stringToMatch = m_stringToMatch.substr( 8 );
|
||||
|
@ -75,7 +78,8 @@ namespace Catch {
|
|||
#endif
|
||||
|
||||
bool isMatch( const TestCase& testCase ) const {
|
||||
const std::string& name = testCase.getTestCaseInfo().name;
|
||||
std::string name = testCase.getTestCaseInfo().name;
|
||||
toLower( name );
|
||||
|
||||
switch( m_wildcardPosition ) {
|
||||
case NoWildcard:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue