MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / listTestsNamesOnly

Function listTestsNamesOnly

unittests/catch.hpp:7765–7780  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7763 }
7764
7765 std::size_t listTestsNamesOnly( Config const& config ) {
7766 TestSpec testSpec = config.testSpec();
7767 std::size_t matchedTests = 0;
7768 std::vector<TestCase> matchedTestCases = filterTests( getAllTestCasesSorted( config ), testSpec, config );
7769 for( auto const& testCaseInfo : matchedTestCases ) {
7770 matchedTests++;
7771 if( startsWith( testCaseInfo.name, '#' ) )
7772 Catch::cout() << '"' << testCaseInfo.name << '"';
7773 else
7774 Catch::cout() << testCaseInfo.name;
7775 if ( config.verbosity() >= Verbosity::High )
7776 Catch::cout() << "\t@" << testCaseInfo.lineInfo;
7777 Catch::cout() << std::endl;
7778 }
7779 return matchedTests;
7780 }
7781
7782 void TagInfo::add( std::string const& spelling ) {
7783 ++count;

Callers 1

listFunction · 0.85

Calls 4

filterTestsFunction · 0.85
startsWithFunction · 0.85
testSpecMethod · 0.80
verbosityMethod · 0.80

Tested by

no test coverage detected