pharo-contributions / mutalk

Mutation Testing in Pharo Smalltalk
21 stars 14 forks source link

Refactor mutant selection strategies #107

Closed DurieuxPol closed 7 months ago

DurieuxPol commented 7 months ago

Fixes #105 Renamed mutant selections strategies to mutant generation strategies to better match what they do, but I kept random mutant selection strategies which I moved to a different package. The selection strategies now only shuffle the mutant collection, and generation strategies call shuffleMutants: from their selection strategy attribute before returning the mutant collection. I added a basic MTMutantSelectionStrategy class that doesn't shuffle the collection, and the random selections inherit from it. I did this because I felt like the "classic" mutant selection strategies from before and the random ones, even if sharing similarities (returning a mutant collection) didn't really have the same purpose. This way I feel like their purposes are now more defined and clear without making the whole thing too complex.