catch3
Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.
Clonegit clone https://git.progmasoft.com/catch3
Move filtered test cases into the FilterMatch instead of copying
- Commit
ed393f09c729a706fb1fa1f2aa1742e206a48b65- Author
- Martin Hořeňovský ·
- Parents
6a5075bf7327
Changes
src/catch2/catch_test_spec.cpp | 10 ++++++---- 1 file 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; }