OperandParser.java

1
package com.rox.cpu.mos6502.assembler;
2
3
/**
4
 * Parses the raw operand text of a single instruction line into an {@link Operand}.
5
 * <p>
6
 * Purely syntactic and mnemonic-agnostic: it decides {@code #$xx} is IMMEDIATE, {@code ($xx,X)} is
7
 * INDIRECT_X, and so on from shape alone. Zero page vs. absolute is decided by hex-digit count
8
 * ({@code $xx} = zero page, {@code $xxxx} = absolute) or, for decimal literals, by magnitude -
9
 * matching how real 6502 assemblers behave. The two cases that can't be resolved from syntax alone
10
 * (no operand token at all, and a bare label reference) are left as {@link Operand} sentinels for
11
 * {@code InstructionResolver} to resolve against what the mnemonic supports.
12
 */
13
final class OperandParser {
14
15
    private OperandParser() {
16
    }
17
18
    static Operand parse(final int lineNumber, final String operandText) {
19 1 1. parse : negated conditional → KILLED
        if (operandText.isEmpty()) {
20 1 1. parse : replaced return value with null for com/rox/cpu/mos6502/assembler/OperandParser::parse → KILLED
            return Operand.EMPTY;
21
        }
22 1 1. parse : negated conditional → KILLED
        if (operandText.equalsIgnoreCase("A")) {
23 1 1. parse : replaced return value with null for com/rox/cpu/mos6502/assembler/OperandParser::parse → KILLED
            return Operand.accumulator();
24
        }
25 1 1. parse : negated conditional → KILLED
        if (operandText.startsWith("#")) {
26 1 1. parse : replaced return value with null for com/rox/cpu/mos6502/assembler/OperandParser::parse → KILLED
            return Operand.of(AddressingMode.IMMEDIATE, parseNumberInRange(lineNumber, operandText.substring(1), 0xFF));
27
        }
28 1 1. parse : negated conditional → KILLED
        if (operandText.startsWith("(")) {
29 1 1. parse : replaced return value with null for com/rox/cpu/mos6502/assembler/OperandParser::parse → KILLED
            return parseIndirect(lineNumber, operandText);
30
        }
31 1 1. parse : negated conditional → KILLED
        if (endsWithIgnoreCase(operandText, ",X")) {
32 1 1. parse : replaced return value with null for com/rox/cpu/mos6502/assembler/OperandParser::parse → KILLED
            return parseDirect(lineNumber, withoutLastTwoChars(operandText), AddressingMode.ZERO_PAGE_X, AddressingMode.ABSOLUTE_X);
33
        }
34 1 1. parse : negated conditional → KILLED
        if (endsWithIgnoreCase(operandText, ",Y")) {
35 1 1. parse : replaced return value with null for com/rox/cpu/mos6502/assembler/OperandParser::parse → KILLED
            return parseDirect(lineNumber, withoutLastTwoChars(operandText), AddressingMode.ZERO_PAGE_Y, AddressingMode.ABSOLUTE_Y);
36
        }
37 1 1. parse : negated conditional → KILLED
        if (looksLikeNumericLiteral(operandText)) {
38 1 1. parse : replaced return value with null for com/rox/cpu/mos6502/assembler/OperandParser::parse → KILLED
            return parseDirect(lineNumber, operandText, AddressingMode.ZERO_PAGE, AddressingMode.ABSOLUTE);
39
        }
40 1 1. parse : negated conditional → KILLED
        if (Identifiers.isValidLabelName(operandText)) {
41 1 1. parse : replaced return value with null for com/rox/cpu/mos6502/assembler/OperandParser::parse → KILLED
            return Operand.labelRef(operandText);
42
        }
43
        throw new AssemblyException(lineNumber, "Invalid operand syntax: " + operandText);
44
    }
45
46
    private static Operand parseIndirect(final int lineNumber, final String text) {
47 1 1. parseIndirect : negated conditional → KILLED
        if (endsWithIgnoreCase(text, "),Y")) {
48 1 1. parseIndirect : Replaced integer subtraction with addition → KILLED
            final String inner = text.substring(1, text.length() - 3).strip();
49 1 1. parseIndirect : replaced return value with null for com/rox/cpu/mos6502/assembler/OperandParser::parseIndirect → KILLED
            return Operand.of(AddressingMode.INDIRECT_Y, parseNumberInRange(lineNumber, inner, 0xFF));
50
        }
51 1 1. parseIndirect : negated conditional → KILLED
        if (endsWithIgnoreCase(text, ",X)")) {
52 1 1. parseIndirect : Replaced integer subtraction with addition → KILLED
            final String inner = text.substring(1, text.length() - 3).strip();
53 1 1. parseIndirect : replaced return value with null for com/rox/cpu/mos6502/assembler/OperandParser::parseIndirect → KILLED
            return Operand.of(AddressingMode.INDIRECT_X, parseNumberInRange(lineNumber, inner, 0xFF));
54
        }
55 1 1. parseIndirect : negated conditional → KILLED
        if (text.endsWith(")")) {
56 1 1. parseIndirect : Replaced integer subtraction with addition → KILLED
            final String inner = text.substring(1, text.length() - 1).strip();
57 1 1. parseIndirect : replaced return value with null for com/rox/cpu/mos6502/assembler/OperandParser::parseIndirect → KILLED
            return Operand.of(AddressingMode.INDIRECT, parseNumberInRange(lineNumber, inner, 0xFFFF));
58
        }
59
        throw new AssemblyException(lineNumber, "Invalid operand syntax: " + text);
60
    }
61
62
    private static Operand parseDirect(final int lineNumber, final String literal,
63
                                        final AddressingMode zeroPageMode, final AddressingMode absoluteMode) {
64
        final int value = parseNumberInRange(lineNumber, literal, 0xFFFF);
65 2 1. parseDirect : replaced return value with null for com/rox/cpu/mos6502/assembler/OperandParser::parseDirect → KILLED
2. parseDirect : negated conditional → KILLED
        return Operand.of(isZeroPage(literal, value) ? zeroPageMode : absoluteMode, value);
66
    }
67
68
    private static boolean isZeroPage(final String literal, final int value) {
69 1 1. isZeroPage : negated conditional → KILLED
        if (literal.startsWith("$")) {
70 4 1. isZeroPage : changed conditional boundary → KILLED
2. isZeroPage : negated conditional → KILLED
3. isZeroPage : replaced boolean return with true for com/rox/cpu/mos6502/assembler/OperandParser::isZeroPage → KILLED
4. isZeroPage : Replaced integer subtraction with addition → KILLED
            return literal.length() - 1 <= 2;
71
        }
72 3 1. isZeroPage : negated conditional → KILLED
2. isZeroPage : replaced boolean return with true for com/rox/cpu/mos6502/assembler/OperandParser::isZeroPage → KILLED
3. isZeroPage : changed conditional boundary → KILLED
        return value <= 0xFF;
73
    }
74
75
    private static boolean looksLikeNumericLiteral(final String text) {
76 3 1. looksLikeNumericLiteral : replaced boolean return with true for com/rox/cpu/mos6502/assembler/OperandParser::looksLikeNumericLiteral → KILLED
2. looksLikeNumericLiteral : negated conditional → KILLED
3. looksLikeNumericLiteral : negated conditional → KILLED
        return text.startsWith("$") || Character.isDigit(text.charAt(0));
77
    }
78
79
    private static int parseNumberInRange(final int lineNumber, final String literal, final int maxValue) {
80
        final int value = parseNumber(lineNumber, literal);
81 4 1. parseNumberInRange : negated conditional → KILLED
2. parseNumberInRange : changed conditional boundary → KILLED
3. parseNumberInRange : changed conditional boundary → KILLED
4. parseNumberInRange : negated conditional → KILLED
        if (value < 0 || value > maxValue) {
82
            throw new AssemblyException(lineNumber, "Value out of range: " + literal);
83
        }
84 1 1. parseNumberInRange : replaced int return with 0 for com/rox/cpu/mos6502/assembler/OperandParser::parseNumberInRange → KILLED
        return value;
85
    }
86
87
    private static int parseNumber(final int lineNumber, final String literal) {
88
        try {
89 2 1. parseNumber : replaced int return with 0 for com/rox/cpu/mos6502/assembler/OperandParser::parseNumber → KILLED
2. parseNumber : negated conditional → KILLED
            return literal.startsWith("$") ? Integer.parseInt(literal.substring(1), 16) : Integer.parseInt(literal);
90
        } catch (final NumberFormatException e) {
91
            throw new AssemblyException(lineNumber, "Invalid numeric literal: " + literal);
92
        }
93
    }
94
95
    private static boolean endsWithIgnoreCase(final String text, final String suffix) {
96 3 1. endsWithIgnoreCase : changed conditional boundary → SURVIVED
2. endsWithIgnoreCase : negated conditional → KILLED
3. endsWithIgnoreCase : replaced boolean return with true for com/rox/cpu/mos6502/assembler/OperandParser::endsWithIgnoreCase → KILLED
        return text.length() >= suffix.length()
97 2 1. endsWithIgnoreCase : negated conditional → KILLED
2. endsWithIgnoreCase : Replaced integer subtraction with addition → KILLED
                && text.regionMatches(true, text.length() - suffix.length(), suffix, 0, suffix.length());
98
    }
99
100
    private static String withoutLastTwoChars(final String text) {
101 2 1. withoutLastTwoChars : replaced return value with "" for com/rox/cpu/mos6502/assembler/OperandParser::withoutLastTwoChars → KILLED
2. withoutLastTwoChars : Replaced integer subtraction with addition → KILLED
        return text.substring(0, text.length() - 2);
102
    }
103
}

Mutations

19

1.1
Location : parse
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Empty]/[method:emptyOperandTextIsTheEmptySentinel()]
negated conditional → KILLED

20

1.1
Location : parse
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Empty]/[method:emptyOperandTextIsTheEmptySentinel()]
replaced return value with null for com/rox/cpu/mos6502/assembler/OperandParser::parse → KILLED

22

1.1
Location : parse
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Immediate]/[method:valueAboveByteRangeIsRejected()]
negated conditional → KILLED

23

1.1
Location : parse
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Accumulator]/[test-template:bareARegisterTokenIsAccumulator(java.lang.String)]/[test-template-invocation:#1]
replaced return value with null for com/rox/cpu/mos6502/assembler/OperandParser::parse → KILLED

25

1.1
Location : parse
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Immediate]/[test-template:hashPrefixedLiteralsAreImmediate(java.lang.String, int)]/[test-template-invocation:#1]
negated conditional → KILLED

26

1.1
Location : parse
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Immediate]/[test-template:hashPrefixedLiteralsAreImmediate(java.lang.String, int)]/[test-template-invocation:#2]
replaced return value with null for com/rox/cpu/mos6502/assembler/OperandParser::parse → KILLED

28

1.1
Location : parse
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Indirect]/[test-template:commaXInsideParensIsIndexedIndirect(java.lang.String)]/[test-template-invocation:#2]
negated conditional → KILLED

29

1.1
Location : parse
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Indirect]/[test-template:commaYOutsideParensIsIndirectIndexed(java.lang.String)]/[test-template-invocation:#1]
replaced return value with null for com/rox/cpu/mos6502/assembler/OperandParser::parse → KILLED

31

1.1
Location : parse
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:ZeroPageAndAbsolute]/[method:valueAboveAddressRangeIsRejected()]
negated conditional → KILLED

32

1.1
Location : parse
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:ZeroPageAndAbsolute]/[test-template:indexedSuffixIsAppliedToTheDisambiguatedMode(java.lang.String, com.rox.cpu.mos6502.assembler.AddressingMode, int)]/[test-template-invocation:#1]
replaced return value with null for com/rox/cpu/mos6502/assembler/OperandParser::parse → KILLED

34

1.1
Location : parse
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:ZeroPageAndAbsolute]/[method:valueAboveAddressRangeIsRejected()]
negated conditional → KILLED

35

1.1
Location : parse
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:ZeroPageAndAbsolute]/[test-template:indexedSuffixIsAppliedToTheDisambiguatedMode(java.lang.String, com.rox.cpu.mos6502.assembler.AddressingMode, int)]/[test-template-invocation:#3]
replaced return value with null for com/rox/cpu/mos6502/assembler/OperandParser::parse → KILLED

37

1.1
Location : parse
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:ZeroPageAndAbsolute]/[test-template:digitCountOrMagnitudeDecidesZeroPageVsAbsolute(java.lang.String, com.rox.cpu.mos6502.assembler.AddressingMode, int)]/[test-template-invocation:#9]
negated conditional → KILLED

38

1.1
Location : parse
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:ZeroPageAndAbsolute]/[test-template:digitCountOrMagnitudeDecidesZeroPageVsAbsolute(java.lang.String, com.rox.cpu.mos6502.assembler.AddressingMode, int)]/[test-template-invocation:#9]
replaced return value with null for com/rox/cpu/mos6502/assembler/OperandParser::parse → KILLED

40

1.1
Location : parse
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:MalformedSyntax]/[method:exceptionMessageIsAttributedToTheSourceLineNumber()]
negated conditional → KILLED

41

1.1
Location : parse
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:LabelReferences]/[test-template:bareIdentifiersAreLabelReferences(java.lang.String)]/[test-template-invocation:#3]
replaced return value with null for com/rox/cpu/mos6502/assembler/OperandParser::parse → KILLED

47

1.1
Location : parseIndirect
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Indirect]/[test-template:commaYOutsideParensIsIndirectIndexed(java.lang.String)]/[test-template-invocation:#1]
negated conditional → KILLED

48

1.1
Location : parseIndirect
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Indirect]/[test-template:commaYOutsideParensIsIndirectIndexed(java.lang.String)]/[test-template-invocation:#1]
Replaced integer subtraction with addition → KILLED

49

1.1
Location : parseIndirect
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Indirect]/[test-template:commaYOutsideParensIsIndirectIndexed(java.lang.String)]/[test-template-invocation:#1]
replaced return value with null for com/rox/cpu/mos6502/assembler/OperandParser::parseIndirect → KILLED

51

1.1
Location : parseIndirect
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Indirect]/[test-template:commaXInsideParensIsIndexedIndirect(java.lang.String)]/[test-template-invocation:#2]
negated conditional → KILLED

52

1.1
Location : parseIndirect
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Indirect]/[test-template:commaXInsideParensIsIndexedIndirect(java.lang.String)]/[test-template-invocation:#2]
Replaced integer subtraction with addition → KILLED

53

1.1
Location : parseIndirect
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Indirect]/[test-template:commaXInsideParensIsIndexedIndirect(java.lang.String)]/[test-template-invocation:#2]
replaced return value with null for com/rox/cpu/mos6502/assembler/OperandParser::parseIndirect → KILLED

55

1.1
Location : parseIndirect
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Indirect]/[method:unbalancedParenthesesAreRejected()]
negated conditional → KILLED

56

1.1
Location : parseIndirect
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Indirect]/[method:parenthesizedAbsoluteIsIndirect()]
Replaced integer subtraction with addition → KILLED

57

1.1
Location : parseIndirect
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Indirect]/[method:parenthesizedAbsoluteIsIndirect()]
replaced return value with null for com/rox/cpu/mos6502/assembler/OperandParser::parseIndirect → KILLED

65

1.1
Location : parseDirect
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:ZeroPageAndAbsolute]/[test-template:digitCountOrMagnitudeDecidesZeroPageVsAbsolute(java.lang.String, com.rox.cpu.mos6502.assembler.AddressingMode, int)]/[test-template-invocation:#9]
replaced return value with null for com/rox/cpu/mos6502/assembler/OperandParser::parseDirect → KILLED

2.2
Location : parseDirect
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:ZeroPageAndAbsolute]/[test-template:digitCountOrMagnitudeDecidesZeroPageVsAbsolute(java.lang.String, com.rox.cpu.mos6502.assembler.AddressingMode, int)]/[test-template-invocation:#9]
negated conditional → KILLED

69

1.1
Location : isZeroPage
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:ZeroPageAndAbsolute]/[test-template:digitCountOrMagnitudeDecidesZeroPageVsAbsolute(java.lang.String, com.rox.cpu.mos6502.assembler.AddressingMode, int)]/[test-template-invocation:#6]
negated conditional → KILLED

70

1.1
Location : isZeroPage
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:ZeroPageAndAbsolute]/[test-template:indexedSuffixIsAppliedToTheDisambiguatedMode(java.lang.String, com.rox.cpu.mos6502.assembler.AddressingMode, int)]/[test-template-invocation:#1]
changed conditional boundary → KILLED

2.2
Location : isZeroPage
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:ZeroPageAndAbsolute]/[test-template:indexedSuffixIsAppliedToTheDisambiguatedMode(java.lang.String, com.rox.cpu.mos6502.assembler.AddressingMode, int)]/[test-template-invocation:#1]
negated conditional → KILLED

3.3
Location : isZeroPage
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:ZeroPageAndAbsolute]/[test-template:indexedSuffixIsAppliedToTheDisambiguatedMode(java.lang.String, com.rox.cpu.mos6502.assembler.AddressingMode, int)]/[test-template-invocation:#2]
replaced boolean return with true for com/rox/cpu/mos6502/assembler/OperandParser::isZeroPage → KILLED

4.4
Location : isZeroPage
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:ZeroPageAndAbsolute]/[test-template:indexedSuffixIsAppliedToTheDisambiguatedMode(java.lang.String, com.rox.cpu.mos6502.assembler.AddressingMode, int)]/[test-template-invocation:#1]
Replaced integer subtraction with addition → KILLED

72

1.1
Location : isZeroPage
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:ZeroPageAndAbsolute]/[test-template:digitCountOrMagnitudeDecidesZeroPageVsAbsolute(java.lang.String, com.rox.cpu.mos6502.assembler.AddressingMode, int)]/[test-template-invocation:#9]
negated conditional → KILLED

2.2
Location : isZeroPage
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:ZeroPageAndAbsolute]/[test-template:digitCountOrMagnitudeDecidesZeroPageVsAbsolute(java.lang.String, com.rox.cpu.mos6502.assembler.AddressingMode, int)]/[test-template-invocation:#9]
replaced boolean return with true for com/rox/cpu/mos6502/assembler/OperandParser::isZeroPage → KILLED

3.3
Location : isZeroPage
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:ZeroPageAndAbsolute]/[test-template:digitCountOrMagnitudeDecidesZeroPageVsAbsolute(java.lang.String, com.rox.cpu.mos6502.assembler.AddressingMode, int)]/[test-template-invocation:#7]
changed conditional boundary → KILLED

76

1.1
Location : looksLikeNumericLiteral
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:LabelReferences]/[test-template:bareIdentifiersAreLabelReferences(java.lang.String)]/[test-template-invocation:#3]
replaced boolean return with true for com/rox/cpu/mos6502/assembler/OperandParser::looksLikeNumericLiteral → KILLED

2.2
Location : looksLikeNumericLiteral
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:LabelReferences]/[test-template:bareIdentifiersAreLabelReferences(java.lang.String)]/[test-template-invocation:#3]
negated conditional → KILLED

3.3
Location : looksLikeNumericLiteral
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:ZeroPageAndAbsolute]/[test-template:digitCountOrMagnitudeDecidesZeroPageVsAbsolute(java.lang.String, com.rox.cpu.mos6502.assembler.AddressingMode, int)]/[test-template-invocation:#9]
negated conditional → KILLED

81

1.1
Location : parseNumberInRange
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Immediate]/[method:valueAboveByteRangeIsRejected()]
negated conditional → KILLED

2.2
Location : parseNumberInRange
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Immediate]/[test-template:hashPrefixedLiteralsAreImmediate(java.lang.String, int)]/[test-template-invocation:#2]
changed conditional boundary → KILLED

3.3
Location : parseNumberInRange
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Immediate]/[test-template:hashPrefixedLiteralsAreImmediate(java.lang.String, int)]/[test-template-invocation:#1]
changed conditional boundary → KILLED

4.4
Location : parseNumberInRange
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Immediate]/[method:negativeValueIsRejected()]
negated conditional → KILLED

84

1.1
Location : parseNumberInRange
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Immediate]/[test-template:hashPrefixedLiteralsAreImmediate(java.lang.String, int)]/[test-template-invocation:#2]
replaced int return with 0 for com/rox/cpu/mos6502/assembler/OperandParser::parseNumberInRange → KILLED

89

1.1
Location : parseNumber
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Immediate]/[method:negativeValueIsRejected()]
replaced int return with 0 for com/rox/cpu/mos6502/assembler/OperandParser::parseNumber → KILLED

2.2
Location : parseNumber
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Immediate]/[method:negativeValueIsRejected()]
negated conditional → KILLED

96

1.1
Location : endsWithIgnoreCase
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Indirect]/[test-template:commaXInsideParensIsIndexedIndirect(java.lang.String)]/[test-template-invocation:#2]
negated conditional → KILLED

2.2
Location : endsWithIgnoreCase
Killed by : none
changed conditional boundary → SURVIVED
Covering tests

3.3
Location : endsWithIgnoreCase
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Indirect]/[test-template:commaXInsideParensIsIndexedIndirect(java.lang.String)]/[test-template-invocation:#2]
replaced boolean return with true for com/rox/cpu/mos6502/assembler/OperandParser::endsWithIgnoreCase → KILLED

97

1.1
Location : endsWithIgnoreCase
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Indirect]/[test-template:commaXInsideParensIsIndexedIndirect(java.lang.String)]/[test-template-invocation:#2]
negated conditional → KILLED

2.2
Location : endsWithIgnoreCase
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:Indirect]/[test-template:commaXInsideParensIsIndexedIndirect(java.lang.String)]/[test-template-invocation:#2]
Replaced integer subtraction with addition → KILLED

101

1.1
Location : withoutLastTwoChars
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:ZeroPageAndAbsolute]/[test-template:indexedSuffixIsAppliedToTheDisambiguatedMode(java.lang.String, com.rox.cpu.mos6502.assembler.AddressingMode, int)]/[test-template-invocation:#1]
replaced return value with "" for com/rox/cpu/mos6502/assembler/OperandParser::withoutLastTwoChars → KILLED

2.2
Location : withoutLastTwoChars
Killed by : com.rox.cpu.mos6502.assembler.OperandParserTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.assembler.OperandParserTest]/[nested-class:ZeroPageAndAbsolute]/[test-template:indexedSuffixIsAppliedToTheDisambiguatedMode(java.lang.String, com.rox.cpu.mos6502.assembler.AddressingMode, int)]/[test-template-invocation:#1]
Replaced integer subtraction with addition → KILLED

Active mutators

Tests examined


Report generated by PIT 1.22.1