I have very very little experience with Java and I'm facing some issues.
I've got a code that looks like the one below and a goal to kill all mutations of it.
public class MyClass {
protected transient boolean something = false;
public MyClass () {
something = true;
}
boolean isSomething () {
return something;
}
}
My test code looks like this
tester = MyClass();
assertTrue(tester.isSomething());
By running it with pitest, on Eclipse, it would generate the following mutations (all related to the return something
statement):
- Substituted 1 with 0
- Removed assignment to member variable something
- Substituted 1 with 0
- Substituted 1 with -1
- Substituted 1 with -1
- Substituted 1 with 2
- Substituted 1 with 0
Unfortunately, I just can't kill those 4 and 5 mutations, both that substitutes 1 with -1. Is there a way I could kill them?