Skip to content

Use the configured Catch2 headers in tests - #18

Closed
james-d-mitchell wants to merge 1 commit into
codex/upstream-main-35db5d9cefrom
codex/fix-external-catch2
Closed

james-d-mitchell wants to merge 1 commit into
codex/upstream-main-35db5d9cefrom
codex/fix-external-catch2

Conversation

@james-d-mitchell

Copy link
Copy Markdown
Owner

The external-Catch2 CI jobs fail when tests include the bundled Catch2 3.14.0 header but link against Catch2 3.16.1, which changed Catch::ITransientExpression. Remove the direct bundled-header includes from all 14 affected test files and use their existing test-main.hpp include to select the configured Catch2 headers. No dependency versions are pinned.

This addresses the CI failure observed on libsemigroups#1105.

Validation:

  • Reproduced the original missing-typeinfo linker failure in an isolated example; removing the bundled header made the example link and pass with Catch2 3.16.1.
  • Built test_knuth_bendix, test_matrix, and test_rewriting_system with make -j6, using both bundled Catch2 3.14.0 and external Catch2 3.16.1.
  • Ran each executable with [quick]: 597 test cases and 4,363 assertions passed in each configuration.
  • Verified all 14 changed test objects use external Catch2 headers in the external configuration.
  • pre-commit run --hook-stage pre-push --files <changed files> and git diff --check: passed.

AI assistance: OpenAI Codex diagnosed the failure, prepared the fix, ran validation, and wrote the commit message and PR description. The commit includes Codex as a co-author.

Remove direct includes of the bundled Catch2 3.14.0 header from the
Knuth-Bendix, matrix, and rewriting-system tests. test-main.hpp already
selects the configured bundled or external Catch2 header.

This fixes the missing Catch::ITransientExpression typeinfo when these
tests are linked against external Catch2 3.16.1.

AI assistance: OpenAI Codex diagnosed the CI failure, prepared the fix,
ran validation, and wrote the commit message and PR description.

Co-authored-by: Codex <noreply@openai.com>
@james-d-mitchell
james-d-mitchell deleted the codex/fix-external-catch2 branch October 10, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant