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

Coverage collector picks first node that matches instead of covered node #17264

Open
balsa-sarenac opened this issue Oct 13, 2024 · 0 comments · May be fixed by #17467
Open

Coverage collector picks first node that matches instead of covered node #17264

balsa-sarenac opened this issue Oct 13, 2024 · 0 comments · May be fixed by #17467

Comments

@balsa-sarenac
Copy link
Member

balsa-sarenac commented Oct 13, 2024

We encountered the bug when measureing coverage of:

RBChangeMethodNameRefactoring >> hasPermutedArguments
    oldSelector numArgs = newSelector numArgs ifFalse: [^true].
    1 to: oldSelector numArgs
	do: [:i | (permutation at: i) = i ifFalse: [^true]].
    ^false

Notice that this method has two times ifFalse: [^true].

Initially both blocks were uncovered. When covering the second block with true the first one was collected as covered.
We were able to correctly collect the second one as covered when adding halt statement in the first block.

This seems to be related to pattern matcher, since changing the block did the trick.

Proposed solution: use path to node instead of node for collecting nodes.

@guillep guillep linked a pull request Nov 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant