Tag and test case name querying are now case insensitive

This commit is contained in:
Phil Nash 2013-03-12 18:47:53 +00:00
parent d78cfe1275
commit 17479c6e49
4 changed files with 17 additions and 5 deletions

View file

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