DebugReport.java

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

Mutations

26

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