1
|
|
package com.adventofcode.day16 |
2
|
|
|
3
|
5
1. getFirstHigherBound : replaced int return with 0 for com/adventofcode/day16/ValidRanges::getFirstHigherBound → SURVIVED
2. getFirstLowerBound : replaced int return with 0 for com/adventofcode/day16/ValidRanges::getFirstLowerBound → SURVIVED
3. getSecondHigherBound : replaced int return with 0 for com/adventofcode/day16/ValidRanges::getSecondHigherBound → SURVIVED
4. getSecondLowerBound : replaced int return with 0 for com/adventofcode/day16/ValidRanges::getSecondLowerBound → SURVIVED
5. getName : replaced return value with "" for com/adventofcode/day16/ValidRanges::getName → KILLED
|
class ValidRanges(val name: String, val firstLowerBound: Int, val firstHigherBound: Int, val secondLowerBound: Int, val secondHigherBound: Int) { |
4
|
|
|
5
|
|
private val firstRange = firstLowerBound.rangeTo(firstHigherBound) |
6
|
|
private val secondRange = secondLowerBound.rangeTo(secondHigherBound) |
7
|
|
|
8
|
|
override fun toString(): String { |
9
|
1
1. toString : replaced return value with "" for com/adventofcode/day16/ValidRanges::toString → KILLED
|
return "$name: [$firstLowerBound to $firstHigherBound] or [$secondLowerBound to $secondHigherBound]" |
10
|
|
} |
11
|
|
|
12
|
|
fun accept(field: Int): Boolean { |
13
|
3
1. accept : replaced boolean return with true for com/adventofcode/day16/ValidRanges::accept → KILLED
2. accept : negated conditional → KILLED
3. accept : negated conditional → KILLED
|
return firstRange.contains(field) || secondRange.contains(field) |
14
|
|
} |
15
|
|
} |
| | Mutations |
3 |
|
1.1 Location : getFirstHigherBound Killed by : none replaced int return with 0 for com/adventofcode/day16/ValidRanges::getFirstHigherBound → SURVIVED 2.2 Location : getFirstLowerBound Killed by : none replaced int return with 0 for com/adventofcode/day16/ValidRanges::getFirstLowerBound → SURVIVED 3.3 Location : getName Killed by : com.adventofcode.day16.TicketTest.[engine:junit-jupiter]/[class:com.adventofcode.day16.TicketTest]/[method:shouldFFindValidOnesAccordingToValidRange()] replaced return value with "" for com/adventofcode/day16/ValidRanges::getName → KILLED 4.4 Location : getSecondHigherBound Killed by : none replaced int return with 0 for com/adventofcode/day16/ValidRanges::getSecondHigherBound → SURVIVED 5.5 Location : getSecondLowerBound Killed by : none replaced int return with 0 for com/adventofcode/day16/ValidRanges::getSecondLowerBound → SURVIVED
|
9 |
|
1.1 Location : toString Killed by : com.adventofcode.day16.ValidRangesTest.[engine:junit-jupiter]/[class:com.adventofcode.day16.ValidRangesTest]/[method:shouldDisplayNicely()] replaced return value with "" for com/adventofcode/day16/ValidRanges::toString → KILLED
|
13 |
|
1.1 Location : accept Killed by : com.adventofcode.day16.ValidRangesTest.[engine:junit-jupiter]/[class:com.adventofcode.day16.ValidRangesTest]/[method:shouldNotAcceptInvalidField()] replaced boolean return with true for com/adventofcode/day16/ValidRanges::accept → KILLED 2.2 Location : accept Killed by : com.adventofcode.day16.ValidRangesTest.[engine:junit-jupiter]/[class:com.adventofcode.day16.ValidRangesTest]/[method:shouldAcceptValidField()] negated conditional → KILLED 3.3 Location : accept Killed by : com.adventofcode.day16.ValidRangesTest.[engine:junit-jupiter]/[class:com.adventofcode.day16.ValidRangesTest]/[method:shouldAcceptValidField()] negated conditional → KILLED
|