| 1242 | class TestGroup { |
| 1243 | public: |
| 1244 | explicit TestGroup(IEventListenerPtr&& reporter, Config const* config): |
| 1245 | m_reporter(reporter.get()), |
| 1246 | m_config{config}, |
| 1247 | m_context{config, CATCH_MOVE(reporter)} { |
| 1248 | |
| 1249 | assert( m_config->testSpec().getInvalidSpecs().empty() && |
| 1250 | "Invalid test specs should be handled before running tests" ); |
| 1251 | |
| 1252 | auto const& allTestCases = getAllTestCasesSorted(*m_config); |
| 1253 | auto const& testSpec = m_config->testSpec(); |
| 1254 | if ( !testSpec.hasFilters() ) { |
| 1255 | for ( auto const& test : allTestCases ) { |
| 1256 | if ( !test.getTestCaseInfo().isHidden() ) { |
| 1257 | m_tests.emplace( &test ); |
| 1258 | } |
| 1259 | } |
| 1260 | } else { |
| 1261 | m_matches = |
| 1262 | testSpec.matchesByFilter( allTestCases, *m_config ); |
| 1263 | for ( auto const& match : m_matches ) { |
| 1264 | m_tests.insert( match.tests.begin(), |
| 1265 | match.tests.end() ); |
| 1266 | } |
| 1267 | } |
| 1268 | |
| 1269 | m_tests = createShard(m_tests, m_config->shardCount(), m_config->shardIndex()); |
| 1270 | } |
| 1271 | |
| 1272 | Totals execute() { |
| 1273 | Totals totals; |
nothing calls this directly
no test coverage detected