TangentStrategy.kt

1
package com.github.sanity.pav.spline
2
3
import com.github.sanity.pav.Point
4
import java.util.*
5
6
interface TangentStrategy {
7
    fun compute(points: Iterable<PointWithSecants>): ArrayList<PointWithTangents>
8
}
9
10 2 1. getPointWithSecants : mutated return of Object value for com/github/sanity/pav/spline/PointWithTangents::getPointWithSecants to ( if (x != null) null else throw new RuntimeException ) → KILLED
2. getTangent : replaced return of double value with -(x + 1) for com/github/sanity/pav/spline/PointWithTangents::getTangent → KILLED
data class PointWithTangents(val pointWithSecants: PointWithSecants, val tangent: Double) {
11 1 1. getX : replaced return of double value with -(x + 1) for com/github/sanity/pav/spline/PointWithTangents::getX → KILLED
    val x = pointWithSecants.point.x
12 1 1. getY : replaced return of double value with -(x + 1) for com/github/sanity/pav/spline/PointWithTangents::getY → KILLED
    val y = pointWithSecants.point.y
13
}
14
15 3 1. getPoint : mutated return of Object value for com/github/sanity/pav/spline/PointWithSecants::getPoint to ( if (x != null) null else throw new RuntimeException ) → KILLED
2. getSecantAfter : mutated return of Object value for com/github/sanity/pav/spline/PointWithSecants::getSecantAfter to ( if (x != null) null else throw new RuntimeException ) → KILLED
3. getSecantBefore : mutated return of Object value for com/github/sanity/pav/spline/PointWithSecants::getSecantBefore to ( if (x != null) null else throw new RuntimeException ) → KILLED
data class PointWithSecants(val point: Point, val secantBefore: Secant?, val secantAfter: Secant?)
16
17 1 1. getSlope : replaced return of double value with -(x + 1) for com/github/sanity/pav/spline/Secant::getSlope → KILLED
data class Secant(val slope: Double) {
18 3 1. : Replaced double division with multiplication → SURVIVED
2. : Replaced double subtraction with addition → KILLED
3. : Replaced double subtraction with addition → KILLED
    constructor(start: Point, end: Point) : this((end.y - start.y) / (end.x - start.x))
19
}

Mutations

10

1.1
Location : getPointWithSecants
Killed by : com.github.sanity.pav.spline.FritschCarlsonTangentStrategySpec.com.github.sanity.pav.spline.FritschCarlsonTangentStrategySpec
mutated return of Object value for com/github/sanity/pav/spline/PointWithTangents::getPointWithSecants to ( if (x != null) null else throw new RuntimeException ) → KILLED

2.2
Location : getTangent
Killed by : com.github.sanity.pav.spline.FritschCarlsonTangentStrategySpec.com.github.sanity.pav.spline.FritschCarlsonTangentStrategySpec
replaced return of double value with -(x + 1) for com/github/sanity/pav/spline/PointWithTangents::getTangent → KILLED

11

1.1
Location : getX
Killed by : com.github.sanity.pav.spline.MonotoneSplineSpec.com.github.sanity.pav.spline.MonotoneSplineSpec
replaced return of double value with -(x + 1) for com/github/sanity/pav/spline/PointWithTangents::getX → KILLED

12

1.1
Location : getY
Killed by : com.github.sanity.pav.spline.MonotoneSplineSpec.com.github.sanity.pav.spline.MonotoneSplineSpec
replaced return of double value with -(x + 1) for com/github/sanity/pav/spline/PointWithTangents::getY → KILLED

15

1.1
Location : getPoint
Killed by : com.github.sanity.pav.spline.SecantsCalculatorSpec.com.github.sanity.pav.spline.SecantsCalculatorSpec
mutated return of Object value for com/github/sanity/pav/spline/PointWithSecants::getPoint to ( if (x != null) null else throw new RuntimeException ) → KILLED

2.2
Location : getSecantAfter
Killed by : com.github.sanity.pav.spline.SecantsCalculatorSpec.com.github.sanity.pav.spline.SecantsCalculatorSpec
mutated return of Object value for com/github/sanity/pav/spline/PointWithSecants::getSecantAfter to ( if (x != null) null else throw new RuntimeException ) → KILLED

3.3
Location : getSecantBefore
Killed by : com.github.sanity.pav.spline.SecantsCalculatorSpec.com.github.sanity.pav.spline.SecantsCalculatorSpec
mutated return of Object value for com/github/sanity/pav/spline/PointWithSecants::getSecantBefore to ( if (x != null) null else throw new RuntimeException ) → KILLED

17

1.1
Location : getSlope
Killed by : com.github.sanity.pav.spline.FritschCarlsonTangentStrategySpec.com.github.sanity.pav.spline.FritschCarlsonTangentStrategySpec
replaced return of double value with -(x + 1) for com/github/sanity/pav/spline/Secant::getSlope → KILLED

18

1.1
Location :
Killed by : com.github.sanity.pav.spline.SecantsCalculatorSpec.com.github.sanity.pav.spline.SecantsCalculatorSpec
Replaced double subtraction with addition → KILLED

2.2
Location :
Killed by : com.github.sanity.pav.spline.SecantsCalculatorSpec.com.github.sanity.pav.spline.SecantsCalculatorSpec
Replaced double subtraction with addition → KILLED

3.3
Location :
Killed by : none
Replaced double division with multiplication → SURVIVED

Active mutators

Tests examined


Report generated by PIT 1.1.10