MapperNames.java

1
package com.rox.cartridge.debug;
2
3
import java.util.Map;
4
5
/** Display name for each iNES mapper number this codebase supports - see {@code RomLoader}. */
6
public final class MapperNames {
7
    private static final Map<Integer, String> NAMES = Map.of(
8
            0, "NROM",
9
            1, "MMC1",
10
            4, "MMC3"
11
    );
12
13
    private MapperNames(){
14
    }
15
16
    /** @return the board name for {@code mapperNumber}, or "Unknown" if this codebase doesn't support it. */
17
    public static String nameOf(final int mapperNumber){
18 1 1. nameOf : replaced return value with "" for com/rox/cartridge/debug/MapperNames::nameOf → KILLED
        return NAMES.getOrDefault(mapperNumber, "Unknown");
19
    }
20
}

Mutations

18

1.1
Location : nameOf
Killed by : com.rox.cartridge.debug.MapperNamesTest.[engine:junit-jupiter]/[class:com.rox.cartridge.debug.MapperNamesTest]/[method:fallsBackToUnknownForAnUnsupportedMapperNumber()]
replaced return value with "" for com/rox/cartridge/debug/MapperNames::nameOf → KILLED

Active mutators

Tests examined


Report generated by PIT 1.22.1