diff options
| author | Martin Hořeňovský | 2026-09-07 21:20:02 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2026-09-11 11:16:05 +0200 |
| commit | ed393f09c729a706fb1fa1f2aa1742e206a48b65 (patch) | |
| tree | c7c7d02c6b6eabfb231c0d0f8cf5a259a25be06b /src | |
| parent | 6a5075bf73273ecb83fca61efdfde2fa1a2690bf (diff) | |
| download | catch3-ed393f09c729a706fb1fa1f2aa1742e206a48b65.tar.gz | |
Move filtered test cases into the FilterMatch instead of copying
Diffstat (limited to 'src')
| -rw-r--r-- | src/catch2/catch_test_spec.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/catch2/catch_test_spec.cpp b/src/catch2/catch_test_spec.cpp index f32f9864..f7c202df 100644 --- a/src/catch2/catch_test_spec.cpp +++ b/src/catch2/catch_test_spec.cpp @@ -113,12 +113,14 @@ namespace Catch { matches.reserve( m_filters.size() ); for ( auto const& filter : m_filters ) { std::vector<TestCaseHandle const*> currentMatches; - for ( auto const& test : testCases ) + for ( auto const& test : testCases ) { if ( isThrowSafe( test, config ) && - filter.matches( test.getTestCaseInfo() ) ) + filter.matches( test.getTestCaseInfo() ) ) { currentMatches.emplace_back( &test ); - matches.push_back( - FilterMatch{ extractFilterName( filter ), currentMatches } ); + } + } + matches.push_back( FilterMatch{ extractFilterName( filter ), + CATCH_MOVE( currentMatches ) } ); } return matches; } |