mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 21:05:39 +02:00
Remove --list-test-names-only
People should use verbosity modifiers with `--list-tests` instead. Closes #1190
This commit is contained in:
@@ -181,9 +181,6 @@ namespace Catch {
|
||||
| Opt( setVerbosity, "quiet|normal|high" )
|
||||
["-v"]["--verbosity"]
|
||||
( "set output verbosity" )
|
||||
| Opt( config.listTestNamesOnly )
|
||||
["--list-test-names-only"]
|
||||
( "list all/matching test cases names only" )
|
||||
| Opt( config.listReporters )
|
||||
["--list-reporters"]
|
||||
( "list all reporters" )
|
||||
|
@@ -41,7 +41,6 @@ namespace Catch {
|
||||
}
|
||||
|
||||
bool Config::listTests() const { return m_data.listTests; }
|
||||
bool Config::listTestNamesOnly() const { return m_data.listTestNamesOnly; }
|
||||
bool Config::listTags() const { return m_data.listTags; }
|
||||
bool Config::listReporters() const { return m_data.listReporters; }
|
||||
|
||||
|
@@ -30,7 +30,6 @@ namespace Catch {
|
||||
bool listTests = false;
|
||||
bool listTags = false;
|
||||
bool listReporters = false;
|
||||
bool listTestNamesOnly = false;
|
||||
|
||||
bool showSuccessfulTests = false;
|
||||
bool shouldDebugBreak = false;
|
||||
@@ -79,7 +78,6 @@ namespace Catch {
|
||||
std::string const& getFilename() const;
|
||||
|
||||
bool listTests() const;
|
||||
bool listTestNamesOnly() const;
|
||||
bool listTags() const;
|
||||
bool listReporters() const;
|
||||
|
||||
|
@@ -71,22 +71,6 @@ namespace Catch {
|
||||
Catch::cout() << pluralise(matchedTestCases.size(), "matching test case") << '\n' << std::endl;
|
||||
}
|
||||
|
||||
void listTestsNamesOnly(Config const& config) {
|
||||
TestSpec testSpec = config.testSpec();
|
||||
std::size_t matchedTests = 0;
|
||||
std::vector<TestCase> matchedTestCases = filterTests(getAllTestCasesSorted(config), testSpec, config);
|
||||
for (auto const& testCaseInfo : matchedTestCases) {
|
||||
matchedTests++;
|
||||
if (startsWith(testCaseInfo.name, '#'))
|
||||
Catch::cout() << '"' << testCaseInfo.name << '"';
|
||||
else
|
||||
Catch::cout() << testCaseInfo.name;
|
||||
if (config.verbosity() >= Verbosity::High)
|
||||
Catch::cout() << "\t@" << testCaseInfo.lineInfo;
|
||||
Catch::cout() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
void listTags(Config const& config) {
|
||||
TestSpec testSpec = config.testSpec();
|
||||
if (config.hasTestFilters())
|
||||
@@ -172,10 +156,6 @@ namespace Catch {
|
||||
listed = true;
|
||||
listTests(*config);
|
||||
}
|
||||
if (config->listTestNamesOnly()) {
|
||||
listed = true;
|
||||
listTestsNamesOnly(*config);
|
||||
}
|
||||
if (config->listTags()) {
|
||||
listed = true;
|
||||
listTags(*config);
|
||||
|
Reference in New Issue
Block a user