-
Notifications
You must be signed in to change notification settings - Fork 14
MTMatrix
A MTMatrix represents the results of some mutations against some tests. A blue box means the test fails for the mutation.
There are 4 ways to create a MTMatrix depending on the situation:
- using a class:
matrix := MTMatrix forAClass: MTAuxiliarClassForMatrix
- using collections of classes and tests:
matrix := MTMatrix forClasses: { UUID } andTests: { UUIDTest. UUIDPrimitivesTest }
- using a package (when the test package simply has the suffixe "-Tests":
matrix := MTMatrix forAPackage: 'Athens-Core'
- using a package and a test package:
matrix := MTMatrix forAPackage: 'Network-UUID' andTestPackage: 'Network-Tests'
Now that you have your matrix, you can get several information about the mutations of your subject with it.
But before that you need to build it with:
matrix build
These are the information you can get:
Mutants killed by every tests:
matrix trivialMutants inspect
Mutants that are killed by the exact same tests.
equivalentMutants
returns all sets of mutants mutually equivalent:
matrix equivalentMutants inspect
For a given mutant, all mutants that are killed by the same tests as the given mutant or part of those tests, and no others.
includedMutants
returns a dictionary of all mutants and their included mutants:
matrix includedMutants inspect
A matrix of mutants and tests like the one above:
matrix generateMatrix