Skip to content

docs: guide for library tests across translation units (fixes #421)#3110

Open
leno23 wants to merge 1 commit into
catchorg:develfrom
leno23:docs/library-tests-discovery-421
Open

docs: guide for library tests across translation units (fixes #421)#3110
leno23 wants to merge 1 commit into
catchorg:develfrom
leno23:docs/library-tests-discovery-421

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 17, 2026

Summary

  • Add docs/library-tests.md explaining how to link all test TUs into one executable
  • Cover CMake layout with Catch2::Catch2WithMain and catch_discover_tests
  • Document custom main with Catch::Session and common static-library linking pitfalls
  • Link from FAQ, reference index, and cmake-integration

Test plan

  • Doc-only change

Fixes #421

Made with Cursor

Document single-executable linking, CMake layout, and custom main.
Adds FAQ entry and cross-links from cmake-integration.

Fixes catchorg#421
@codecov
Copy link
Copy Markdown

codecov Bot commented May 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.26%. Comparing base (69e0473) to head (c025a85).

Additional details and impacted files
@@           Coverage Diff           @@
##            devel    #3110   +/-   ##
=======================================
  Coverage   91.26%   91.26%           
=======================================
  Files         204      204           
  Lines        8905     8905           
=======================================
  Hits         8127     8127           
  Misses        778      778           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Document How to make Catch tests in a library be found

1 participant