Person.kt

1
package com.adventofcode.day06
2
3
class Person(responses: String) {
4
5
    val answers = responses.toCharArray().distinct().filter { it.toLowerCase() in  'a'.rangeTo('z')}
6
7
    fun questionAnswered(): Int {
8 1 1. questionAnswered : replaced int return with 0 for com/adventofcode/day06/Person::questionAnswered → KILLED
        return answers.size
9
    }
10
11
    override fun toString(): String {
12 1 1. toString : replaced return value with "" for com/adventofcode/day06/Person::toString → KILLED
        return answers.joinToString("")
13
    }
14
}

Mutations

8

1.1
Location : questionAnswered
Killed by : com.adventofcode.day06.PersonTest.[engine:junit-jupiter]/[class:com.adventofcode.day06.PersonTest]/[method:shouldCountDistinctResponses()]
replaced int return with 0 for com/adventofcode/day06/Person::questionAnswered → KILLED

12

1.1
Location : toString
Killed by : com.adventofcode.day06.PersonTest.[engine:junit-jupiter]/[class:com.adventofcode.day06.PersonTest]/[method:shouldDisplayNicely()]
replaced return value with "" for com/adventofcode/day06/Person::toString → KILLED

Active mutators

Tests examined


Report generated by PIT 1.6.1