| 9118 | } |
| 9119 | |
| 9120 | Catch::Totals runTests(std::shared_ptr<Config> const& config) { |
| 9121 | IStreamingReporterPtr reporter = makeReporter(config); |
| 9122 | addListeners(reporter, config); |
| 9123 | |
| 9124 | RunContext context(config, std::move(reporter)); |
| 9125 | |
| 9126 | Totals totals; |
| 9127 | |
| 9128 | context.testGroupStarting(config->name(), 1, 1); |
| 9129 | |
| 9130 | TestSpec testSpec = config->testSpec(); |
| 9131 | |
| 9132 | auto const& allTestCases = getAllTestCasesSorted(*config); |
| 9133 | for (auto const& testCase : allTestCases) { |
| 9134 | if (!context.aborting() && matchTest(testCase, testSpec, *config)) |
| 9135 | totals += context.runTest(testCase); |
| 9136 | else |
| 9137 | context.reporter().skipTest(testCase); |
| 9138 | } |
| 9139 | |
| 9140 | if (config->warnAboutNoTests() && totals.testCases.total() == 0) { |
| 9141 | ReusableStringStream testConfig; |
| 9142 | |
| 9143 | bool first = true; |
| 9144 | for (const auto& input : config->getTestsOrTags()) { |
| 9145 | if (!first) { testConfig << ' '; } |
| 9146 | first = false; |
| 9147 | testConfig << input; |
| 9148 | } |
| 9149 | |
| 9150 | context.reporter().noMatchingTestCases(testConfig.str()); |
| 9151 | totals.error = -1; |
| 9152 | } |
| 9153 | |
| 9154 | context.testGroupEnded(config->name(), totals, 1, 1); |
| 9155 | return totals; |
| 9156 | } |
| 9157 | |
| 9158 | void applyFilenamesAsTags(Catch::IConfig const& config) { |
| 9159 | auto& tests = const_cast<std::vector<TestCase>&>(getAllTestCasesSorted(config)); |
no test coverage detected