SWE 619 Assignment 4
Rep-Invariants, contracts, tests.
GrowList class from assignment 3.
You should consider the mutable version.
The abstraction function is already implemented,
but the rep-invariant is not.
There are two parts to the assignment.
Implement the rep-invariant (as
statement deletion mutation operator (SDL) , which deletes
a statement from a program.
A mutant produced by this operator is detected if there is a test that has
different outputs on the original program and the mutated program.
Find two instances of this operator:
To help out the GTA,
document your SDL faults with easily identifiable comments in your code.
Make the two faults/tests independent, which means that you find a test that
violate the rep-invariant without violating a contract and vice versa.
If that is not possible, explain why not.
- An SDL mutant that causes the rep-invariant to fail.
Demonstrate this with a call to
repOk() from a (failing) JUnit test.
- An SDL mutant that causes a method contract to be violated.
Demonstrate this with a call to the relevant method from a (failing) JUnit test.