Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorMartin Hořeňovský2017-06-22 19:27:17 +0200
committerMartin Hořeňovský2017-06-25 17:12:29 +0200
commit07c6bfc3b9aa473d41cd4abcd1962c093ca0f531 (patch)
tree3d4a595b1b4313d0531aa8fecc02b7714e559513 /include
parent616f7235efc875ee239c1dc6ddb48025e05e57ff (diff)
downloadcatch3-07c6bfc3b9aa473d41cd4abcd1962c093ca0f531.tar.gz
--extra-info -> --list-extra-info, behaves like other --list-* flags
Diffstat (limited to 'include')
-rw-r--r--include/internal/catch_commandline.hpp6
-rw-r--r--include/internal/catch_config.hpp6
-rw-r--r--include/internal/catch_list.hpp8
3 files changed, 10 insertions, 10 deletions
diff --git a/include/internal/catch_commandline.hpp b/include/internal/catch_commandline.hpp
index 07115db4..3ece92f8 100644
--- a/include/internal/catch_commandline.hpp
+++ b/include/internal/catch_commandline.hpp
@@ -187,9 +187,9 @@ namespace Catch {
.describe( "list all/matching test cases names only" )
.bind( &ConfigData::listTestNamesOnly );
- cli["--extra-info"]
- .describe( "list more info" )
- .bind( &ConfigData::extraInfo );
+ cli["--list-extra-info"]
+ .describe( "list all/matching test cases with more info" )
+ .bind( &ConfigData::listExtraInfo );
cli["--list-reporters"]
.describe( "list all reporters" )
diff --git a/include/internal/catch_config.hpp b/include/internal/catch_config.hpp
index 304fe32b..b006d512 100644
--- a/include/internal/catch_config.hpp
+++ b/include/internal/catch_config.hpp
@@ -31,7 +31,7 @@ namespace Catch {
listTags( false ),
listReporters( false ),
listTestNamesOnly( false ),
- extraInfo( false ),
+ listExtraInfo( false ),
showSuccessfulTests( false ),
shouldDebugBreak( false ),
noThrow( false ),
@@ -51,7 +51,7 @@ namespace Catch {
bool listTags;
bool listReporters;
bool listTestNamesOnly;
- bool extraInfo;
+ bool listExtraInfo;
bool showSuccessfulTests;
bool shouldDebugBreak;
@@ -111,7 +111,7 @@ namespace Catch {
bool listTestNamesOnly() const { return m_data.listTestNamesOnly; }
bool listTags() const { return m_data.listTags; }
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; }
diff --git a/include/internal/catch_list.hpp b/include/internal/catch_list.hpp
index b692f4e3..747b17c8 100644
--- a/include/internal/catch_list.hpp
+++ b/include/internal/catch_list.hpp
@@ -47,10 +47,10 @@ namespace Catch {
Colour colourGuard( colour );
Catch::cout() << Text( testCaseInfo.name, nameAttr ) << std::endl;
- if( config.extraInfo() ) {
+ if( config.listExtraInfo() ) {
Catch::cout() << " " << testCaseInfo.lineInfo << std::endl;
std::string description = testCaseInfo.description;
- if( description == "" )
+ if( description.empty() )
description = "(NO DESCRIPTION)";
Catch::cout() << Text( description, descAttr ) << std::endl;
}
@@ -80,7 +80,7 @@ namespace Catch {
Catch::cout() << '"' << testCaseInfo.name << '"';
else
Catch::cout() << testCaseInfo.name;
- if ( config.extraInfo() )
+ if ( config.listExtraInfo() )
Catch::cout() << "\t@" << testCaseInfo.lineInfo;
Catch::cout() << std::endl;
}
@@ -174,7 +174,7 @@ namespace Catch {
inline Option<std::size_t> list( Config const& config ) {
Option<std::size_t> listedCount;
- if( config.listTests() )
+ if( config.listTests() || config.listExtraInfo() )
listedCount = listedCount.valueOr(0) + listTests( config );
if( config.listTestNamesOnly() )
listedCount = listedCount.valueOr(0) + listTestsNamesOnly( config );