Repository navigation
Support static unit tests and guarded in-source doctest cases - #59
Conversation
Add private function-style testing configuration and preserve the existing per-file test executables and examples. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Compile implementation sources directly into an independent doctest runner, preserve private build requirements for static unit tests, and isolate DLL import definitions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve per-file test mains, document the function-style configuration and private-header convention, register Linux/Windows checks, and retain source-backed Scout knowledge. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Share header generation between production and test targets, including default and named file sets without explicit consumer dependencies. Verify clean direct-target builds and keep the anonymous component present in both compilation modes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
sean-parent
left a comment
There was a problem hiding this comment.
Talos review
Verdict: no findings. Reviewed the full PR diff against main at b584778352610c8b00ca5e35faabc1518d285c64 (merge base 13ff79ac9fbbf575bbab0ab3dee0c752b4501fcc). This is a comment review, not approval.
| Files | Reviewers | Candidates → validated → accepted | Shown | Tests |
|---|---|---|---|---|
| 23 | 6 personas, challenge | 0 → 0 → 0 | 0 of 0 | All 13 repository script regressions passed locally, including required AppleClang clangd navigation, real-doctest source testing, C++17/20/23, and the existing install/docs suites. Workflow YAML parsing, template-presence checks, and git diff --check passed. |
All six baseline personas completed: security, correctness, standards, architecture, operations, and documentation. The challenge reviewer validated the empty candidate set. Accepted findings: 0; posted inline comments: 0; overflow: 0; unanchored findings: 0; recurrences: 0. No prior PR review comments existed when checked.
Project context: CLAUDE.md and .github/copilot-instructions.md loaded from the merge-base revision. GitHub custom instructions: 1 instruction file, 23 matched paths, no diagnostics. No active spec context. Full diff supplied through immutable local artifacts; personas read those files rather than receiving duplicated inline diff text. Host-configured subagent models were used.
Persona routing: static roster (DCAP routing off; rerun with --dcap to enable).
Org knowledge: off (rerun with --knowledge).
Scout
Used: risk MEDIUM, evidence HIGH, status COMPLETE (scout 0.9.135, 1s).
Cross-file leads given to reviewers: 0 changed symbol(s) with uses outside the diff, 0 new value(s) not handled everywhere, 1 possibly unused symbol(s).
Tests to run (Scout: 14 Must Run test(s), in these files):
tests/setup/fixtures/source_testing/include/fixture/api.hpptests/setup/fixtures/source_testing/src/component.cpptests/setup/fixtures/source_testing/src/private/component.hpptests/setup/fixtures/source_testing/src/registration.cpptests/setup/fixtures/source_testing/tests/existing.cpptests/setup/fixtures/source_testing/examples/example.cpptests/setup/fixtures/source_testing/tests/rejected_fail.cpptests/setup/fixtures/mock_doctest.cmake
These are fixture locations, exercised through test_source_testing.cmake, test_header_checks.cmake, and test_target_type.cmake, not standalone test commands. Scout reported conservative whole-file roots for 14 changed files where snapshot/parser mapping did not yield precise hunk roots; persona review used the complete Git diff.
Verification limitations
Local validation ran on macOS with CMake 4.5.0, Ninja 1.13.2, AppleClang/clangd 21, and Doxygen 1.18.0. The dependency harness retains its existing intentional manual fatal-error-case skip. No unexpected top-level diagnostics appeared. Windows-specific behavior cannot be validated on this host. At the latest CI check, Ubuntu unit tests, all three clangd variants, integration tests, and documentation passed; Windows static/DLL consumer checks were still running. See the CI run.
Summary
src/headers available to implementations and unit tests, withsrc/private/as the documented convention.<cpp-library/testing.hpp>with the function-styleCPP_LIBRARY_TESTING()macro, defined as0or1.Test plan
Fresh local validation at
b584778352610c8b00ca5e35faabc1518d285c64, using macOS, CMake 4.5.0, Ninja 1.13.2, AppleClang/clangd 21, and Doxygen 1.18.0. Compiled script fixtures configure, build, and test internally.cmake -P tests/install/CMakeLists.txt— dependency mapping/provider harness; zero failures. Its existing manual fatal-error case remains skipped.cmake -P tests/install/test_provider_merge.cmake— provider merging.cmake -P tests/install/test_nested_install.cmake— existing nested static/shared installation coverage.cmake -P tests/install/test_package_ci.cmake— generated package artifact checks.cmake -P tests/setup/test_target_type.cmake— target types and dialect settings.cmake -P tests/setup/test_header_checks.cmake— independent public-header compilation, including C++17/20/23.cmake -P tests/setup/test_source_testing.cmake— nine configurations covering static/shared production, C++17/20/23 source-only tests, expected assertion failure, disabled testing, header-only, and nested use. Checks exact-once embedded execution, compile-fail diagnostics, private requirements, and clean generated-header builds.cmake -P tests/setup/test_version_override.cmake— scoped version overrides.cmake -P tests/setup/test_install_dirs.cmake— installation directories.cmake -P tests/setup/test_runtime_dlls.cmake— runtime deployment.cmake -P tests/setup/test_setup_version_resolution.cmake— scaffold version resolution.cmake -P tests/docs/test_docs.cmake— documentation configuration and rendering.cmake -DCPP_LIBRARY_TEST_CLANGD=ON -DCPP_LIBRARY_TEST_COMPILER_ID=AppleClang -P tests/setup/test_clangd.cmake— required fresh clangd navigation and configure-only header commands.git diff --check origin/main...HEAD, Ruby YAML parsing of.github/workflows/ci.yml, and the workflow's template-presence checks.CI: all seven jobs passed at the PR head, including Windows static/DLL and PowerShell coverage, all three clangd platforms, generated-consumer integration, and documentation.Generated with GitHub Copilot CLI