@@ -60,9 +60,14 @@ namespace Catch {
6060 // can be, so the tracker has to throw for a wrong
6161 // filter to stop the execution flow.
6262 if (filter.type == PathFilter::For::Section) {
63- // TBD: Explicit SKIP, or new exception that says
64- // "don't continue", but doesn't show in totals?
65- SKIP ();
63+ // We want the semantics of `SKIP()`, but we inline it
64+ // to avoid issues with conditionally prefixed macros
65+ INTERNAL_CATCH_MSG (
66+ " SKIP" ,
67+ Catch::ResultWas::ExplicitSkip,
68+ Catch::ResultDisposition::Normal,
69+ " " );
70+ Catch::Detail::Unreachable ();
6671 }
6772 // '*' is the wildcard for "all elements in generator"
6873 // used for filtering sections below the generator, but
@@ -519,8 +524,12 @@ namespace Catch {
519524 // TBD: Do we want to avoid the warning if the generator is filtered?
520525 if ( m_config->warnAboutInfiniteGenerators () &&
521526 !generator->isFinite () ) {
522- // TBD: Would it be better to expand this macro inline?
523- FAIL ( " GENERATE() would run infinitely" );
527+ // We want the semantics of `FAIL()`, but we inline it
528+ // to avoid issues with conditionally prefixed macros
529+ INTERNAL_CATCH_MSG ( " FAIL" ,
530+ Catch::ResultWas::ExplicitFailure,
531+ Catch::ResultDisposition::Normal,
532+ " GENERATE() would run infinitely" );
524533 }
525534
526535 auto nameAndLoc = TestCaseTracking::NameAndLocation ( static_cast <std::string>( generatorName ), lineInfo );
0 commit comments