tests(event_poller): cover start()'s fatal-guard; document rest as tooling noise - #105
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Yaraslaut
force-pushed
the
investigate/test-event-poller-coverage
branch
from
August 16, 2026 07:06
0dfc37d to
f3304cf
Compare
…ublic method
Every other test in this file only exercises the timer indirectly
(the constructor's own _timer.start(interval), handleError's
_timer.stop(), resume()'s own _timer.start()) -- start()/stop() (the
pause/resume pair a hidden poll view uses, per event_poller.hpp's own
doc comments) were never called directly by anything, so start()'s
only branch (`if (!_fatal)`) never ran either arm.
The other 79 flagged gap-units in this file (14 pure misses, ~66
partials) are confirmed tooling noise, not real gaps: every pure-miss
line is either a FAIL("... must not run ...") body inside an
onEvent/onFatalError lambda (whose entire purpose is to prove a
scenario the test's own passing run already disproves), or the
"other half" of a dispatch closure a sibling test's own scenario
exercises instead of this one. The partials sampled are Catch2
macro-expansion branches, a ternary whose both arms are exercised
across the file in aggregate just not within one closure instantiation,
or defensive invariant conditionals proving a double-report bug can't
happen -- none are real EventPoller-class gaps.
Yaraslaut
force-pushed
the
investigate/test-event-poller-coverage
branch
from
August 16, 2026 07:52
f3304cf to
5dbd871
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Investigated examples/common/testkit/test_event_poller.cpp -- the single
largest remaining coverage gap in the codebase (80 gap-units, 72.41%
covered). Verdict: almost entirely tooling noise, with one real gap.
The 14 pure-miss lines: tooling noise
Every one is a defensive/invariant-proving statement that must never
execute for its own test to pass:
FAIL("... must not run ...")bodies insideonEvent/onFatalErrorlambdas -- their entire purpose is proving the Pollercorrectly suppresses these callbacks in that scenario.
.then()and.onError()wired, mirroring production's shape) where each test'sfixture only forces one arm -- the other arm is exercised by a
sibling test's scenario, just not within the same closure
instantiation. Per-line coverage artifact, not a missing behavior.
The ~66 partial branches: also noise (sampled, not exhaustive)
Catch2 macro-expansion branches (the large majority), a ternary whose
both arms are exercised in aggregate across the file (just not per
closure), and defensive invariant conditionals proving a double-report
bug can't happen.
One genuine gap, closed
start()/stop()(the pause/resume pair a hidden poll view uses, perevent_poller.hpp's own doc comments) were never called directly byanything in this file -- every other test only exercises the timer
indirectly.
start()'s only branch (if (!_fatal)) had never runeither arm. Added one test covering both:
start()rearms a merely-stopped timer, but refuses once a genuinely fatal error has stopped it
for good (only
resume()can undo that).Verification
ladder_common_testsfiltered to[event-poller]: 11 test cases,72 assertions, all passing (10 cases before this change).