|
1
|
|
package com.rox.time; |
|
2
|
|
|
|
3
|
|
public final class ThreadSleeper implements Sleeper { |
|
4
|
|
@Override |
|
5
|
|
public void sleepFor(long nanos) throws InterruptedException { |
|
6
|
1
1. sleepFor : Replaced long division with multiplication → SURVIVED
|
long millis = nanos / 1_000_000; |
|
7
|
1
1. sleepFor : Replaced long modulus with multiplication → KILLED
|
int remainingNanos = (int) (nanos % 1_000_000); |
|
8
|
|
|
|
9
|
1
1. sleepFor : removed call to java/lang/Thread::sleep → KILLED
|
Thread.sleep(millis, remainingNanos); |
|
10
|
|
} |
|
11
|
|
} |
| | Mutations |
| 6 |
|
1.1 Location : sleepFor Killed by : none Replaced long division with multiplication → SURVIVED
Covering tests
Covered by tests:
- com.rox.clock.FPSClockTest.[engine:junit-jupiter]/[class:com.rox.clock.FPSClockTest]/[method:aStopAfterPrepareToRunCancelsTheRunWithoutATick()]
- com.rox.cpu.mos6502.MOS6502ALUTest.[engine:junit-jupiter]/[class:com.rox.cpu.mos6502.MOS6502ALUTest]/[test-template:testAND(int, int, int, boolean, boolean)]/[test-template-invocation:#12]
- com.rox.ppu.debug.TileDecoderTest.[engine:junit-jupiter]/[class:com.rox.ppu.debug.TileDecoderTest]/[method:allZeroTileDecodesToAllZeroPixels()]
- com.rox.mem.NESMemoryBusTest.[engine:jqwik]/[class:com.rox.mem.NESMemoryBusTest]/[property:writeInCartridgeRangeRoutedToCartridge(int, int)]
- com.rox.NESTest.[engine:junit-jupiter]/[class:com.rox.NESTest]/[method:powerOnGracefullyHandlesInterruptionDuringTheWarmUpSleepItself()]
- com.rox.cpu.mos6502.MOS6502SnapshotTest.[engine:jqwik]/[class:com.rox.cpu.mos6502.MOS6502SnapshotTest]/[property:packedRegistersAndFlagsUnpackToTheSameState(int, int, int, int, int, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean)]
- com.rox.debug.report.DebugReportWriterTest.[engine:junit-jupiter]/[class:com.rox.debug.report.DebugReportWriterTest]/[method:writesTheDescription(java.nio.file.Path)]
- com.rox.NESTest.[engine:junit-jupiter]/[class:com.rox.NESTest]/[method:powerOnGracefullyHandlesInterruptionAfterAudioHasAlreadyStarted()]
- com.rox.NESTest.[engine:junit-jupiter]/[class:com.rox.NESTest]/[method:powerOffWhilePausedStillShutsDown()]
- com.rox.NESTest.[engine:junit-jupiter]/[class:com.rox.NESTest]/[method:powerOnLetsTheClockWarmUpBeforeStartingAudioOutput()]
- com.rox.NESTest.[engine:junit-jupiter]/[class:com.rox.NESTest]/[method:captureAndRestoreAreRefusedWhileRunningButAllowedOncePaused()]
- com.rox.NESTest.[engine:junit-jupiter]/[class:com.rox.NESTest]/[method:powerOffReturnsOnlyOnceTheClockHasStoppedTicking()]
- com.rox.NESTest.[engine:junit-jupiter]/[class:com.rox.NESTest]/[method:pauseFreezesARunningNesAndResumeCarriesOn()]
- com.rox.clock.FPSClockTest.[engine:junit-jupiter]/[class:com.rox.clock.FPSClockTest]/[method:run()]
- com.rox.clock.FPSClockTest.[engine:junit-jupiter]/[class:com.rox.clock.FPSClockTest]/[method:runWhenAlreadyRunning()]
- com.rox.clock.FPSClockTest.[engine:junit-jupiter]/[class:com.rox.clock.FPSClockTest]/[method:unitClock()]
|
| 7 |
|
1.1 Location : sleepFor Killed by : com.rox.clock.FPSClockTest.[engine:junit-jupiter]/[class:com.rox.clock.FPSClockTest]/[method:runWhenAlreadyRunning()] Replaced long modulus with multiplication → KILLED
|
| 9 |
|
1.1 Location : sleepFor Killed by : com.rox.clock.FPSClockTest.[engine:junit-jupiter]/[class:com.rox.clock.FPSClockTest]/[method:run()] removed call to java/lang/Thread::sleep → KILLED
|