test: lift interpreter/mod.rs region coverage to 94%+#369
Merged
Conversation
The previous round of additions hit the verifier on a number of "wishlist syntax" shapes and CI marked the failing arms #[ignore], which left them silently unexercised. Most of those failures were syntax mistakes (`&&` not `&`, `wh` not `~`, `?(>x 5)` parsing as match-on-literal, ok_out trimming pad output, etc.), not language gaps. Fix the syntax, drop the ignore markers, and add ~40 more tests covering rd/wr/rdl/wrl/rdjl, jpth array indexing, numeric map keys, prnt, inline-lambda capture, empty-list HOF early returns, rgxsub bad-pattern, inv/solve non-square, matmul element type, grp numeric+bool keys, and HOF/builtin error arms deferred through _-typed wildcards so the runtime evaluator's diagnostic paths get hit rather than the verifier short-circuiting them. 215 tests pass.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
Follow-up to #350 (test/coverage-interpreter), which landed an initial pass that drove
src/interpreter/mod.rsfrom 90.72% region coverage to ~91%. A round of CI fixes there marked the tree-walker tests#[ignore]when they failed, which silently took those interpreter arms back out of coverage.This PR removes every
#[ignore = "uses wishlist syntax not yet in ilo"]marker and ports the corresponding tests to syntax the verifier actually accepts (most failures were syntax mistakes, not language gaps), then adds another ~40 cases to drive coverage of the under-tested branches.What it covers, on top of the merged set:
_-typed wildcard params so the runtime evaluator's diagnostic arms get hitThe two failing tests after the rebase (
mapr_short_circuits_on_errandpropagate_unwrap_err) were asserting on stdout when an Err-returning program legitimately exits non-zero and writes the message to stderr; fixed to useerr_stderrinstead ofok_out.215 tests in
tests/coverage_interpreter.rspass.Test plan
cargo test --release --features cranelift --test coverage_interpreter— 215 passedcargo fmtcargo clippy --release --features cranelift --tests— cleansrc/interpreter/mod.rs≥ 94% (cov re-run still in flight at PR open; will update once it lands)Follow-ups