#3223

Support generator index lists and inclusive ranges

Openrithikasridharbabu-2007wants to merge intofrom

Description

Allow generator filters (-g, --generator-index, and g: path filters) to select increasing lists and inclusive ranges such as 1,3,6-10. This lets users rerun several generated inputs in one invocation. Reject duplicates, overlaps, decreasing ranges, and malformed selections.

Store range endpoints without expanding every index. Advance filtered generators during test execution so an unavailable later index is reported through the normal exception handler. Preserve single-index, wildcard, and nested section/generator behavior.

Add parser tests, exact selected-value/order checks, nested execution and failure-path coverage, an infinite-generator termination check, and user documentation.

Validation

  • 82/82 basic CTest tests pass.
  • The C++14 all-tests build succeeds, including amalgamated compilation and variants with exceptions disabled.
  • 156/157 full CTest tests pass locally on macOS with AppleClang 17.
  • CMakeConfig::ExperimentalRedirect also fails on an untouched copy of the base commit: catch_output_redirect.cpp has an unused private m_buffer field treated as an error. That file is unchanged by this PR.
  • Generated amalgamated distribution files are excluded from the changes.

GitHub Issues

Implements the accepted/rejected examples in #3071. This implementation uses inclusive ranges and rejects unsorted, duplicate, or overlapping selections. Open-ended ranges are outside its scope.

Activity

2
codecov[bot]8d ago

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 91.23%. Comparing base (0809213) to head (b914a69).

Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #3223      +/-   ##
==========================================
+ Coverage   91.18%   91.23%   +0.05%     
==========================================
  Files         205      206       +1     
  Lines        9101     9143      +42     
==========================================
+ Hits         8298     8341      +43     
+ Misses        803      802       -1     
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.