MutationIdFactory

Create mutation ID's from source code mutations.

Note that the checksum is only based on the content and how it is changed. The filename is not part of the checksum. This mean that the checksum will "detect and reattach" to a file after a rename.

The algorithm is a checksum of: * the content of all relevant tokens, e.g. all except comments * the token position before and after the mutant. * the original text * the mutated text

Constructors

this
this(Path fileName, Token[] tokens)

Members

Functions

makeId
Checksum128 makeId(const(ubyte)[] mut)

Calculate the unique ID for a specific mutation at this point.

makeMutant
CodeMutant makeMutant(Mutation m, const(ubyte)[] mut)

Create a mutant at this mutation point.

updatePosition
void updatePosition(size_t preCnt, size_t postCnt)

Update the number of tokens that are before and after the mutant.

Meta