DebugReport.java

1
package com.rox.debug.report;
2
3
import com.rox.cartridge.Mirroring;
4
import com.rox.cpu.mos6502.assembler.DisassembledInstruction;
5
import com.rox.save.SystemSnapshot;
6
7
import java.time.LocalDateTime;
8
import java.util.List;
9
import java.util.Map;
10
11
/**
12
 * Everything captured when an issue is flagged mid-game - see {@link DebugReportWriter} for the files
13
 * it becomes. {@code snapshot} is the restorable whole-system state; the other fields are what can't
14
 * be derived from it alone (the ROM is needed to disassemble, the mapper to describe its banks).
15
 *
16
 * @param romName the ROM's file name, for the report header
17
 * @param screenshotRgb the last complete frame shown (packed {@code 0xRRGGBB}, 256x240), or
18
 * {@code null} if none had been shown yet
19
 * @param partialFrameRgb the PPU's framebuffer at the moment of capture - usually part-drawn
20
 * @param mirroring the mapper's current nametable mirroring, not the header's
21
 * @param upcomingInstructions disassembly forward from the CPU's PC
22
 */
23
public record DebugReport(LocalDateTime capturedAt, String romName, String description, int[] screenshotRgb,
24
                          int[] partialFrameRgb, SystemSnapshot snapshot, Mirroring mirroring,
25
                          Map<String, String> mapperState,
26
                          List<DisassembledInstruction> upcomingInstructions) {
27
28
    public DebugReport withDescription(final String newDescription){
29 1 1. withDescription : replaced return value with null for com/rox/debug/report/DebugReport::withDescription → KILLED
        return new DebugReport(capturedAt, romName, newDescription, screenshotRgb, partialFrameRgb, snapshot,
30
                mirroring, mapperState, upcomingInstructions);
31
    }
32
}

Mutations

29

1.1
Location : withDescription
Killed by : com.rox.debug.report.DebugReportWriterTest.[engine:junit-jupiter]/[class:com.rox.debug.report.DebugReportWriterTest]/[method:writesTheDescription(java.nio.file.Path)]
replaced return value with null for com/rox/debug/report/DebugReport::withDescription → KILLED

Active mutators

Tests examined


Report generated by PIT 1.22.1