Fix branch coverage tracking and expand test suite #444
Open
Fix branch coverage tracking and expand test suite #444
Conversation
…nction edge cases
…keyword only line)
The compiler's pc_raw_ast_map already maps JUMPI PCs to their If AST nodes. Instead of six JUMPI-finding functions (forward scan, backward scan, noop backward, helper gap detection, path classification, event building), just walk the raw trace and when we hit a JUMPI that maps to an If node, check the next PC to determine direction. coverage.py: 815 lines → 497 lines - Remove _build_coverage_events, _find_jumpi_forward_scan, _find_jumpi_noop_backward, _find_jumpi_backward, _has_helper_gap, _classify_from_raw_trace, _resolve_jumpi_direction - Replace CoverageCollector with BranchCollector - Keep reporter improvements (noop branch exclusion, multiline handling, proper false target resolution) environment.py: simplify _trace_computation to pass computation directly to collector instead of building event segments
…locations in skip_arcs path
Collaborator
Author
|
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.
What I did
Branch coverage barely worked with conditional statements/loops/multiline statements as described in #327.
How I did it
How to verify it
python -m pytest tests/unitary/test_coverageDescription for the changelog
Fix branch coverage and expand test suite
Cute Animal Picture