mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-11-04 14:09:33 +01:00 
			
		
		
		
	Remove --list-test-names-only
People should use verbosity modifiers with `--list-tests` instead. Closes #1190
This commit is contained in:
		@@ -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