If --list-extra-info is specified with --list-test-names-only, only output one list

This commit is contained in:
Baruch Burstein 2017-06-22 23:00:18 +03:00 committed by Martin Hořeňovský
parent 07c6bfc3b9
commit 8a14af701e

View File

@ -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() || config.listExtraInfo() ) if( config.listTests() || ( config.listExtraInfo() && !config.listTestNamesOnly() ) )
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 );