Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(coverage): proper branch handling for if statement #8414

Merged
merged 4 commits into from
Jul 12, 2024

Conversation

grandizzy
Copy link
Collaborator

@grandizzy grandizzy commented Jul 11, 2024

Motivation

Closes #4310
Closes #4315
Closes #4309
Closed #7784

Solution

  • fix first branch instruction (comment The first branch is the opcode directly after JUMPI but was + 2)
  • handle false body, add coverage item with proper source code location if exists, otherwise use same branch 0, in order to have consistent display when false body missing
    image
    and if both bodies
    image
  • code cleanup
  • added tests for gh reports

@grandizzy grandizzy changed the title [WIP] fix(coverage): proper handling if statements [WIP] fix(coverage): proper branch handling Jul 12, 2024
@grandizzy grandizzy marked this pull request as ready for review July 12, 2024 14:57
@grandizzy grandizzy changed the title [WIP] fix(coverage): proper branch handling fix(coverage): proper branch handling Jul 12, 2024
@grandizzy grandizzy changed the title fix(coverage): proper branch handling fix(coverage): proper branch handling for if statement Jul 12, 2024
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

brilliant
image

Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgmt

@zerosnacks zerosnacks self-requested a review July 12, 2024 15:40
@zerosnacks
Copy link
Member

zerosnacks commented Jul 12, 2024

Possibly related: #7476

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants