This methods should be fixed to work in the case where we want 0 surviving mutants.
private static void throwErrorIfMoreThanMaxSuvivingMutants(
final MutationStatistics stats, final long threshold) {
if ((threshold > 0)
&& (stats.getTotalSurvivingMutations() > threshold)) {
throw new RuntimeException("Had "
+ stats.getTotalSurvivingMutations() + " surviving mutants, but only "
+ threshold + " survivors allowed");
}
}
to
private static void throwErrorIfMoreThanMaxSuvivingMutants(
final MutationStatistics stats, final long threshold) {
if ((threshold >= 0)
&& (stats.getTotalSurvivingMutations() > threshold)) {
throw new RuntimeException("Had "
+ stats.getTotalSurvivingMutations() + " surviving mutants, but only "
+ threshold + " survivors allowed");
}
}
See #269