Files
DimensionalRipper/tests/PauseOwnershipRegression.java
T
Disy 32b11aee87 fix: improve threaded world compatibility and chunk reads in 1.1.15
Add regression tests and per-dimension progress diagnostics. Document the unresolved C2ME random-initialization redirect conflict.
2026-10-03 21:24:31 +08:00

17 lines
1.0 KiB
Java

import dev.modzuozhi.core.compat.PauseOwnership;
public final class PauseOwnershipRegression {
public static void main(String[] args) {
for (int mask = 0; mask < 16; mask++) {
boolean paused = PauseOwnership.shouldPause((mask & 1) != 0, (mask & 2) != 0,
(mask & 4) != 0, (mask & 8) != 0);
if (paused != (mask == 15)) throw new AssertionError("Loading screen paused worker: " + mask);
}
if (PauseOwnership.workerOwns(false, false, false)) throw new AssertionError("Startup routed to absent worker");
if (!PauseOwnership.workerOwns(true, false, false)) throw new AssertionError("Running loop lost ownership");
if (!PauseOwnership.workerOwns(true, true, true)) throw new AssertionError("In-flight tick lost ownership");
if (PauseOwnership.workerOwns(true, true, false)) throw new AssertionError("Idle paused worker kept requests");
System.out.println("PASS: loading/login pause gate and drained-pause chunk ownership");
}
}