test: densify ctest suite — line coverage 86.4% → 93.1% (tests-only)#30
Merged
Conversation
…union verifier - coverage.sh: fix uncovered.txt sort key (region-cov col 4 -> line-cov col 10). - coverage.sh: capture llvm-cov's "N functions have mismatched data" warning (benign: header inline/template code instantiated across all test binaries with differing mapping hashes; the merge drops unmatched variants) and replace it with a plain-language NOTE in totals.txt; silence duplicate emissions. - cov_union.py: on-demand per-binary union verifier for exact header line coverage (recovers the multi-binary undercount, e.g. generic_matrix.hpp ~77% reported -> ~86% true). .cpp metric unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add 15 unit tests targeting the lowest-covered translation units, raising line coverage from 86.38% to 93.06% (499 fewer missed lines). ctest 53 -> 68, all pass under the canonical Release (-DNDEBUG) gate. No src/ or include/ changes; TV corpus parity unchanged (245 excellent + 1 anomaly). All tests are NDEBUG-proof (self-rolled CHECK + failure-counter return, not bare assert() which the Release gate would no-op) and pin real Pine-correct behavior via closed-form OHLC oracles / na+warmup edges. New per-TU coverage: engine_report 73->100, session_time 68->90, engine_run 79->93, engine_path_resolve 78->94, engine_security 86->93, matrix 88->98, timeframe 89->94, c_abi 16->100, ta_moving_averages 93->100, ta_extremes_volume 95->99, ta_oscillators 95->99, ta_volatility_trend 94->97, engine_strategy_commands 92->96, engine_fills 94->96, engine_lower_tf 88->95. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Densifies the
ctestunit suite so passing it more strongly underwrites "~95% of pinescript reproduced." Tests + coverage-tooling only — zerosrc//include/changes.-DNDEBUG) gate.15 new tests target the lowest-covered translation units, pinning real Pine-correct behavior via closed-form OHLC oracles and
na/warmup edge cases.Per-TU line coverage
NDEBUG-proof tests
The prescribed gate builds Release (
-DNDEBUG), which no-ops bareassert()and makes assert-only tests pass vacuously. All new tests use a self-rolledCHECK+ failure-counter return instead; non-vacuity was confirmed by corrupt-and-rebuild. (Note: the pre-existingtest_security_tf_validation.cpphas this latentassert()/NDEBUG defect — flagged, out of scope here.)Coverage tooling (
scripts/)coverage.sh: fixuncovered.txtsort key (was sorting by region cov col 4, now line cov col 10); capture llvm-cov's"N functions have mismatched data"warning — benign (header inline/template code instantiated across all test binaries with differing mapping hashes; the merge drops unmatched variants) — and replace it with a plain-language NOTE.cov_union.py: on-demand per-binary union verifier for exact header line coverage (recovers the multi-binary undercount, e.g.generic_matrix.hpp~77% reported → ~86% true)..cppheadline metric unchanged.Verification
ctest68/68 pass (Release).scripts/run_corpus.shparity unchanged.src/orinclude/diffs.🤖 Generated with Claude Code