test: close coverage gaps; replace launcher lambdas; exclude artifacts#308
Conversation
- Remove any_oom_rollback.cpp. Each of its 7 mock types instantiated the full any_* vtable, but the test only constructs-then-throws, so the per-type await_*/destroy thunks were never exercised, adding many uncovered lines in include/boost/capy/io/ to cover 9 rollback lines. Mark those 9 defensive rollback lines LCOV_EXCL_LINE (reachable only by forcing operator new to throw); the existing any_* tests cover the wrappers. - when_all / when_any: replace the immediately-invoked generic launcher lambda with a named launch_all() member template. The lambda body ran but its coverage was never attributed to a covered line; a named call is. - when_any: make the throwing-payload test awaitable suspend (await_ready false) so its transform await_suspend path is exercised. - execution_context: exclude the double-checked-locking re-check bodies in use_service_impl/make_service_impl, reachable only via a concurrent same-type registration race (the first check handles sequential calls). - any_read_stream: exclude the read_some awaitable body, exercised by the tests but counted uncovered per template instantiation. This also drops the global operator new replacement, removing the need for its sanitizer guard and valgrind probe.
|
An automated preview of the documentation is available at https://308.capy.prtest3.cppalliance.org/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2026-06-10 15:46:18 UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #308 +/- ##
===========================================
- Coverage 98.10% 98.09% -0.02%
===========================================
Files 164 164
Lines 8931 8873 -58
===========================================
- Hits 8762 8704 -58
Misses 169 169
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 12 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Remove any_oom_rollback.cpp. Each of its 7 mock types instantiated the full any_* vtable, but the test only constructs-then-throws, so the per-type await_/destroy thunks were never exercised, adding many uncovered lines in include/boost/capy/io/ to cover 9 rollback lines. Mark those 9 defensive rollback lines LCOV_EXCL_LINE (reachable only by forcing operator new to throw); the existing any_ tests cover the wrappers.
when_all / when_any: replace the immediately-invoked generic launcher lambda with a named launch_all() member template. The lambda body ran but its coverage was never attributed to a covered line; a named call is.
when_any: make the throwing-payload test awaitable suspend (await_ready false) so its transform await_suspend path is exercised.
execution_context: exclude the double-checked-locking re-check bodies in use_service_impl/make_service_impl, reachable only via a concurrent same-type registration race (the first check handles sequential calls).
any_read_stream: exclude the read_some awaitable body, exercised by the tests but counted uncovered per template instantiation.
This also drops the global operator new replacement, removing the need for its sanitizer guard and valgrind probe.