| 10651 | } |
| 10652 | |
| 10653 | Catch::Totals runTests(std::shared_ptr<Config> const& config) { |
| 10654 | auto reporter = makeReporter(config); |
| 10655 | |
| 10656 | RunContext context(config, std::move(reporter)); |
| 10657 | |
| 10658 | Totals totals; |
| 10659 | |
| 10660 | context.testGroupStarting(config->name(), 1, 1); |
| 10661 | |
| 10662 | TestSpec testSpec = config->testSpec(); |
| 10663 | |
| 10664 | auto const& allTestCases = getAllTestCasesSorted(*config); |
| 10665 | for (auto const& testCase : allTestCases) { |
| 10666 | if (!context.aborting() && matchTest(testCase, testSpec, *config)) |
| 10667 | totals += context.runTest(testCase); |
| 10668 | else |
| 10669 | context.reporter().skipTest(testCase); |
| 10670 | } |
| 10671 | |
| 10672 | if (config->warnAboutNoTests() && totals.testCases.total() == 0) { |
| 10673 | ReusableStringStream testConfig; |
| 10674 | |
| 10675 | bool first = true; |
| 10676 | for (const auto& input : config->getTestsOrTags()) { |
| 10677 | if (!first) { testConfig << ' '; } |
| 10678 | first = false; |
| 10679 | testConfig << input; |
| 10680 | } |
| 10681 | |
| 10682 | context.reporter().noMatchingTestCases(testConfig.str()); |
| 10683 | totals.error = -1; |
| 10684 | } |
| 10685 | |
| 10686 | context.testGroupEnded(config->name(), totals, 1, 1); |
| 10687 | return totals; |
| 10688 | } |
| 10689 | |
| 10690 | void applyFilenamesAsTags(Catch::IConfig const& config) { |
| 10691 | auto& tests = const_cast<std::vector<TestCase>&>(getAllTestCasesSorted(config)); |
no test coverage detected