Orientation.kt

1
package com.adventofcode.day12
2
3
4
enum class Orientation(cardinality: Int) {
5
    N(0),
6
    E(1),
7
    S(2),
8
    W(3);
9
10
    fun nextClockWise(): Orientation {
11 1 1. nextClockWise : negated conditional → KILLED
        if(this == W) return N
12 1 1. nextClockWise : Replaced integer addition with subtraction → KILLED
        return Orientation.values()[this.ordinal + 1]
13
    }
14
15
    fun previousClockWise(): Orientation {
16 1 1. previousClockWise : negated conditional → KILLED
        if(this == N) return W
17 1 1. previousClockWise : Replaced integer subtraction with addition → KILLED
        return Orientation.values()[this.ordinal - 1]
18
    }
19
}

Mutations

11

1.1
Location : nextClockWise
Killed by : com.adventofcode.day12.BasicFerryTest.[engine:junit-jupiter]/[class:com.adventofcode.day12.BasicFerryTest]/[method:shouldGiveThaManatthanDistance()]
negated conditional → KILLED

12

1.1
Location : nextClockWise
Killed by : com.adventofcode.day12.BasicFerryTest.[engine:junit-jupiter]/[class:com.adventofcode.day12.BasicFerryTest]/[method:shouldGiveThaManatthanDistance()]
Replaced integer addition with subtraction → KILLED

16

1.1
Location : previousClockWise
Killed by : com.adventofcode.day12.Day12Test.[engine:junit-jupiter]/[class:com.adventofcode.day12.Day12Test]/[method:shouldComputePart01()]
negated conditional → KILLED

17

1.1
Location : previousClockWise
Killed by : com.adventofcode.day12.Day12Test.[engine:junit-jupiter]/[class:com.adventofcode.day12.Day12Test]/[method:shouldComputePart01()]
Replaced integer subtraction with addition → KILLED

Active mutators

Tests examined


Report generated by PIT 1.6.1