Repository navigation
test(cov): raise core line coverage to ≥95% - #50
Merged
Merged
Conversation
Add focused GTest/Lua cases for var/state/logging and math inline paths; extend math builtin fast-paths (fmod/ldexp/type/tointeger/ult) used by those tests.
Expose CollectReturnsForBlock for direct unit coverage of return-walk paths; add focused GTest/Lua cases for interp runtime/vm_ops edges, VarToVi/ViToVar bridges, TCC library config, and file-level literals. Measured locally: 94.6% -> 95.8% (12234/12770) with c_gen.cpp included.
Replace POSIX setenv/unsetenv with a portable helper so MinGW CI builds test_core_cov_gaps.cpp; use a nonexistent CC for the failure path.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #50 +/- ##
==========================================
+ Coverage 88.49% 89.75% +1.25%
==========================================
Files 125 125
Lines 27211 27231 +20
==========================================
+ Hits 24081 24441 +360
+ Misses 3130 2790 -340 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Move coverage-gap tests from test_core_cov_gaps.cpp into existing module suites (common, syntax_tree, string, math, log, jitter, util, native, var, runtime) and delete the catch-all file.
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
c_gen.cppincluded (95.14% on that file alone).SemanticAnalysis::CollectReturnsForBlockfor direct coverage of the return-walk helper; add focused GTest + Lua cases for interpruntime/vm_opsedges,VarToVi/ViToVarbridges, TCClibrariesconfig path, and file-level literals / empty body / dynamic for-step errors.Reproduce (local, USE_COV=ON)
Tip:
e50b569ontest/core-coverage-95. Do not merge until reviewed.Test plan
unit_tests --gtest_filter='core_cov_gaps.*'(18/18 pass)common.c_runtime_cov_matches_kCRuntimeHeaderfailure on one shard; re-run alone passes)c_gen.cpppresent incoverage_core.info