IntNumber.java

1
package com.frk;
2
3
/**
4
 * @date 2024/3/19
5
 */
6
public class IntNumber {
7
    private int a;
8
    private int b;
9
10
    public IntNumber(int a, int b) {
11
        this.a = a;
12
        this.b = b;
13
    }
14
15
    public int add () {
16 1 1. add : negated conditional → KILLED
        if (a == 1)
17 2 1. add : replaced int return with 0 for com/frk/IntNumber::add → KILLED
2. add : Replaced integer addition with subtraction → KILLED
            return a + b;
18 1 1. add : negated conditional → KILLED
        else if(a == 0)
19
            return 0;
20 1 1. add : replaced int return with 0 for com/frk/IntNumber::add → NO_COVERAGE
        return -1;
21
    }
22
}

Mutations

16

1.1
Location : add
Killed by : com.frk.main.TestMain12.test2(com.frk.main.TestMain12)
negated conditional → KILLED

17

1.1
Location : add
Killed by : com.frk.main.TestMain12.test1(com.frk.main.TestMain12)
replaced int return with 0 for com/frk/IntNumber::add → KILLED

2.2
Location : add
Killed by : com.frk.main.TestMain12.test1(com.frk.main.TestMain12)
Replaced integer addition with subtraction → KILLED

18

1.1
Location : add
Killed by : com.frk.main.TestMain12.test2(com.frk.main.TestMain12)
negated conditional → KILLED

20

1.1
Location : add
Killed by : none
replaced int return with 0 for com/frk/IntNumber::add → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.16.0