I am writing a little Eclipse-PlugIn for PiTest (
ePiTest) that supports text and linemarkes for uncovered lines and mutations.
Assume we have a method like this
public static int calc(int a, int b) {
if (a >= b)
return a - b;
return 0;
}
PiTest reports for the the first line "changed conditional boundary". For the user it is not clear in which way the condition was mutated. Since Eclipse-JDT provides access to the Java-AST, i can figure out which kind of condition is affected. With this information I can map the unmutated condition to the mutation, in this case ">=" is mutated to ">" (click
here for more details). So i can change the detail message from "changed conditional boundary" to the more specific "changed '>=' to '>'".
Question: How can I distiguish two or more mutated conditions in a line?
E.g:
I tried to get some informations out of the MutationDetails but neither
index nor
block seems to help here.