mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 19:53:28 +01:00
--extra-info -> --list-extra-info, behaves like other --list-* flags
This commit is contained in:
parent
616f7235ef
commit
07c6bfc3b9
@ -187,9 +187,9 @@ namespace Catch {
|
|||||||
.describe( "list all/matching test cases names only" )
|
.describe( "list all/matching test cases names only" )
|
||||||
.bind( &ConfigData::listTestNamesOnly );
|
.bind( &ConfigData::listTestNamesOnly );
|
||||||
|
|
||||||
cli["--extra-info"]
|
cli["--list-extra-info"]
|
||||||
.describe( "list more info" )
|
.describe( "list all/matching test cases with more info" )
|
||||||
.bind( &ConfigData::extraInfo );
|
.bind( &ConfigData::listExtraInfo );
|
||||||
|
|
||||||
cli["--list-reporters"]
|
cli["--list-reporters"]
|
||||||
.describe( "list all reporters" )
|
.describe( "list all reporters" )
|
||||||
|
@ -31,7 +31,7 @@ namespace Catch {
|
|||||||
listTags( false ),
|
listTags( false ),
|
||||||
listReporters( false ),
|
listReporters( false ),
|
||||||
listTestNamesOnly( false ),
|
listTestNamesOnly( false ),
|
||||||
extraInfo( false ),
|
listExtraInfo( false ),
|
||||||
showSuccessfulTests( false ),
|
showSuccessfulTests( false ),
|
||||||
shouldDebugBreak( false ),
|
shouldDebugBreak( false ),
|
||||||
noThrow( false ),
|
noThrow( false ),
|
||||||
@ -51,7 +51,7 @@ namespace Catch {
|
|||||||
bool listTags;
|
bool listTags;
|
||||||
bool listReporters;
|
bool listReporters;
|
||||||
bool listTestNamesOnly;
|
bool listTestNamesOnly;
|
||||||
bool extraInfo;
|
bool listExtraInfo;
|
||||||
|
|
||||||
bool showSuccessfulTests;
|
bool showSuccessfulTests;
|
||||||
bool shouldDebugBreak;
|
bool shouldDebugBreak;
|
||||||
@ -111,7 +111,7 @@ namespace Catch {
|
|||||||
bool listTestNamesOnly() const { return m_data.listTestNamesOnly; }
|
bool listTestNamesOnly() const { return m_data.listTestNamesOnly; }
|
||||||
bool listTags() const { return m_data.listTags; }
|
bool listTags() const { return m_data.listTags; }
|
||||||
bool listReporters() const { return m_data.listReporters; }
|
bool listReporters() const { return m_data.listReporters; }
|
||||||
bool extraInfo() const { return m_data.extraInfo; }
|
bool listExtraInfo() const { return m_data.listExtraInfo; }
|
||||||
|
|
||||||
std::string getProcessName() const { return m_data.processName; }
|
std::string getProcessName() const { return m_data.processName; }
|
||||||
|
|
||||||
|
@ -47,10 +47,10 @@ namespace Catch {
|
|||||||
Colour colourGuard( colour );
|
Colour colourGuard( colour );
|
||||||
|
|
||||||
Catch::cout() << Text( testCaseInfo.name, nameAttr ) << std::endl;
|
Catch::cout() << Text( testCaseInfo.name, nameAttr ) << std::endl;
|
||||||
if( config.extraInfo() ) {
|
if( config.listExtraInfo() ) {
|
||||||
Catch::cout() << " " << testCaseInfo.lineInfo << std::endl;
|
Catch::cout() << " " << testCaseInfo.lineInfo << std::endl;
|
||||||
std::string description = testCaseInfo.description;
|
std::string description = testCaseInfo.description;
|
||||||
if( description == "" )
|
if( description.empty() )
|
||||||
description = "(NO DESCRIPTION)";
|
description = "(NO DESCRIPTION)";
|
||||||
Catch::cout() << Text( description, descAttr ) << std::endl;
|
Catch::cout() << Text( description, descAttr ) << std::endl;
|
||||||
}
|
}
|
||||||
@ -80,7 +80,7 @@ namespace Catch {
|
|||||||
Catch::cout() << '"' << testCaseInfo.name << '"';
|
Catch::cout() << '"' << testCaseInfo.name << '"';
|
||||||
else
|
else
|
||||||
Catch::cout() << testCaseInfo.name;
|
Catch::cout() << testCaseInfo.name;
|
||||||
if ( config.extraInfo() )
|
if ( config.listExtraInfo() )
|
||||||
Catch::cout() << "\t@" << testCaseInfo.lineInfo;
|
Catch::cout() << "\t@" << testCaseInfo.lineInfo;
|
||||||
Catch::cout() << std::endl;
|
Catch::cout() << std::endl;
|
||||||
}
|
}
|
||||||
@ -174,7 +174,7 @@ namespace Catch {
|
|||||||
|
|
||||||
inline Option<std::size_t> list( Config const& config ) {
|
inline Option<std::size_t> list( Config const& config ) {
|
||||||
Option<std::size_t> listedCount;
|
Option<std::size_t> listedCount;
|
||||||
if( config.listTests() )
|
if( config.listTests() || config.listExtraInfo() )
|
||||||
listedCount = listedCount.valueOr(0) + listTests( config );
|
listedCount = listedCount.valueOr(0) + listTests( config );
|
||||||
if( config.listTestNamesOnly() )
|
if( config.listTestNamesOnly() )
|
||||||
listedCount = listedCount.valueOr(0) + listTestsNamesOnly( config );
|
listedCount = listedCount.valueOr(0) + listTestsNamesOnly( config );
|
||||||
|
Loading…
Reference in New Issue
Block a user