-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Also mutate >
to >=
and <
to <=
#501
Conversation
The failing test checks for a typo on a source file I didn't touch. |
Hi, thanks for the patch. I think this is worth considering, but we ought to check whether it generates too many low-value hits. Have you tried it on a large tree. |
I leave it up to you, but this mutation is part of established mutation testing tools. https://pitest.org/quickstart/mutators/#CONDITIONALS_BOUNDARY |
I know, but it would also be useful to know that you tried it on some tree and it found a certain fraction of interesting or uninteresting misses. |
I didn't try it on a regular codebase. I just wanted to test this specific use-case, which is the one where Mutation Testing shines, and found it lacking. |
Next steps:
|
18de762
to
be96ac3
Compare
I did my best, but I'm stuck on one of the tests in error. I can't understand where I should set the expectation. |
Thanks, I'll look at the tests, I'm just busy with other things this week. |
No worries, there is no hurry |
The tests are failing in part because (Also, there are two tests called |
>
to >=
and <
to <=
With the tests fixed this does find some missing mutations in this tree:
In the first, it's somewhat usefully pointing out redundant code that could be removed. The second is a bit harder: if ascent > max_ascent {
max_ascent = ascent;
} It's true that no test will notice if |
Actually, even though that mutant is marginal value, rewriting the code to avoid it did find some untested paths, so on the whole perhaps it's a good suggestion. |
Merged in #503, thanks! |
Thanks! You did most of the work. I only added the embryo. |
Most tests miss testing the boundary. Mutation testing can help a lot with this. The current code misses the change from
>
to>=
and<
and<=
.