mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 03:43:28 +01:00
Test for ~ and removed debug print
This commit is contained in:
parent
f82861fb0a
commit
95ae50ad3d
@ -131,7 +131,6 @@ namespace Catch {
|
||||
}
|
||||
TestCaseFilters filters( groupName );
|
||||
for( std::size_t i = 0; i < cmd.argsCount(); ++i ) {
|
||||
std::cout << "[" << cmd[i] << "]" << std::endl;
|
||||
if( startsWith( cmd[i], "exclude:" ) )
|
||||
filters.addFilter( TestCaseFilter( cmd[i].substr( 8 ), IfFilterMatches::ExcludeTests ) );
|
||||
else if( startsWith( cmd[i], "~" ) )
|
||||
|
@ -137,6 +137,15 @@ TEST_CASE( "selftest/parser/2", "ConfigData" ) {
|
||||
REQUIRE( config.filters[0].shouldInclude( makeTestCase( "alwaysIncluded" ) ) );
|
||||
}
|
||||
|
||||
SECTION( "--test/exclude:2", "Specify one test case exclusion using --test ~" ) {
|
||||
const char* argv[] = { "test", "--test", "~test1" };
|
||||
CHECK_NOTHROW( parseIntoConfig( argv, config ) );
|
||||
|
||||
REQUIRE( config.filters.size() == 1 );
|
||||
REQUIRE( config.filters[0].shouldInclude( makeTestCase( "test1" ) ) == false );
|
||||
REQUIRE( config.filters[0].shouldInclude( makeTestCase( "alwaysIncluded" ) ) );
|
||||
}
|
||||
|
||||
SECTION( "-t/2", "Specify two test cases using -t" ) {
|
||||
const char* argv[] = { "test", "-t", "test1", "test2" };
|
||||
CHECK_NOTHROW( parseIntoConfig( argv, config ) );
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Generated: 2012-08-24 18:57:26.838444
|
||||
* Generated: 2012-08-24 19:01:02.483106
|
||||
* ----------------------------------------------------------
|
||||
* This file has been merged from multiple headers. Please don't edit it directly
|
||||
* Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
|
||||
@ -2594,7 +2594,6 @@ namespace Catch {
|
||||
}
|
||||
TestCaseFilters filters( groupName );
|
||||
for( std::size_t i = 0; i < cmd.argsCount(); ++i ) {
|
||||
std::cout << "[" << cmd[i] << "]" << std::endl;
|
||||
if( startsWith( cmd[i], "exclude:" ) )
|
||||
filters.addFilter( TestCaseFilter( cmd[i].substr( 8 ), IfFilterMatches::ExcludeTests ) );
|
||||
else if( startsWith( cmd[i], "~" ) )
|
||||
|
Loading…
Reference in New Issue
Block a user