66
77// SPDX-License-Identifier: BSL-1.0
88
9- // Catch v3.15.1
10- // Generated: 2026-06-14 10:51:56.053498
9+ // Catch v3.15.2
10+ // Generated: 2026-07-07 20:39:49.445081
1111// ----------------------------------------------------------
1212// This file is an amalgamation of multiple different files.
1313// You probably shouldn't edit it directly.
@@ -2394,7 +2394,7 @@ namespace Catch {
23942394 }
23952395
23962396 Version const & libraryVersion () {
2397- static Version version ( 3 , 15 , 1 , " " , 0 );
2397+ static Version version ( 3 , 15 , 2 , " " , 0 );
23982398 return version;
23992399 }
24002400
@@ -6016,6 +6016,8 @@ namespace Catch {
60166016 auto getGenerator () const -> GeneratorBasePtr const & override {
60176017 return m_generator;
60186018 }
6019+
6020+ bool isFilteredImpl () const override { return m_isFiltered; }
60196021 };
60206022 } // namespace
60216023 }
@@ -6360,17 +6362,6 @@ namespace Catch {
63606362 SourceLineInfo lineInfo,
63616363 Generators::GeneratorBasePtr&& generator ) {
63626364
6363- // TBD: Do we want to avoid the warning if the generator is filtered?
6364- if ( m_config->warnAboutInfiniteGenerators () &&
6365- !generator->isFinite () ) {
6366- // We want the semantics of `FAIL()`, but we inline it
6367- // to avoid issues with conditionally prefixed macros
6368- INTERNAL_CATCH_MSG ( " FAIL" ,
6369- Catch::ResultWas::ExplicitFailure,
6370- Catch::ResultDisposition::Normal,
6371- " GENERATE() would run infinitely" );
6372- }
6373-
63746365 auto nameAndLoc = TestCaseTracking::NameAndLocation ( static_cast <std::string>( generatorName ), lineInfo );
63756366 auto & currentTracker = m_trackerContext.currentTracker ();
63766367 assert (
@@ -6383,11 +6374,24 @@ namespace Catch {
63836374 m_trackerContext,
63846375 ¤tTracker,
63856376 CATCH_MOVE ( generator ) );
6386- auto ret = newTracker.get ();
6377+
6378+ // The warning shouldn't fire if the generator is infinite, **but** filtered down.
6379+ if ( m_config->warnAboutInfiniteGenerators () &&
6380+ !newTracker->m_generator ->isFinite () &&
6381+ !newTracker->isFiltered () ) {
6382+ // We want the semantics of `FAIL()`, but we inline it
6383+ // to avoid issues with conditionally prefixed macros
6384+ INTERNAL_CATCH_MSG ( " FAIL" ,
6385+ Catch::ResultWas::ExplicitFailure,
6386+ Catch::ResultDisposition::Normal,
6387+ " GENERATE() would run infinitely" );
6388+ }
6389+
6390+ auto returnPtr = newTracker.get ();
63876391 currentTracker.addChild ( CATCH_MOVE ( newTracker ) );
63886392
6389- ret ->open ();
6390- return ret ;
6393+ returnPtr ->open ();
6394+ return returnPtr ;
63916395 }
63926396
63936397 bool RunContext::testForMissingAssertions (Counts& assertions) {
@@ -7470,6 +7474,28 @@ namespace TestCaseTracking {
74707474 m_ctx.setCurrentTracker ( this );
74717475 }
74727476
7477+ bool SectionTracker::isFilteredImpl () const {
7478+ // TBD: This is currently _very_ similar to the block in `isComplete`.
7479+ // Is this neccessarily that way, or just accident of current semantics?
7480+ const size_t filterIndex =
7481+ m_newStyleFilters ? m_allTrackerDepth : m_sectionOnlyDepth;
7482+
7483+ if ( filterIndex < m_filterRef->size () ) {
7484+ // 1) New style filter must explicitly target section
7485+ if ( m_newStyleFilters && ( *m_filterRef )[filterIndex].type !=
7486+ PathFilter::For::Section ) {
7487+ return true ;
7488+ }
7489+ // 2) Both style filters must match the trimmed name exactly
7490+ if ( m_trimmed_name !=
7491+ StringRef ( ( *m_filterRef )[filterIndex].filter ) ) {
7492+ return true ;
7493+ }
7494+ }
7495+
7496+ return false ;
7497+ }
7498+
74737499 SectionTracker::SectionTracker ( NameAndLocation&& nameAndLocation, TrackerContext& ctx, ITracker* parent )
74747500 : TrackerBase( CATCH_MOVE (nameAndLocation), ctx, parent ),
74757501 m_trimmed_name(trim(StringRef(ITracker::nameAndLocation().name)))
0 commit comments