test(08-02): L5 overflow vector becomes a 3-node path

A 2-node graph has no degree>=2 candidates, so farthestPointAnchors
returns empty before any Dijkstra runs and never reaches the overflow
throw. Node 1 on a 3-node path is a candidate, so the selection pass
actually exercises the law.
This commit is contained in:
araharah-executor
2026-10-25 18:37:01 +08:00
parent c3a31ae7ee
commit 1bf413b3ac
+6 -1
View File
@@ -170,11 +170,16 @@ test("L4 asymmetry — reversed vs forward rows differ on an oneway graph", asyn
test("L5 overflow throws — any label > 65000 quanta fails loud, naming the fix", async () => {
const { landmarkTables, farthestPointAnchors, LANDMARK_MAX_QUANTA } = await loadLandmark();
assert.equal(LANDMARK_MAX_QUANTA, 65000);
// 3-node path so node 1 is a degree-2 candidate — the anchor-selection
// pass actually runs (a 2-node graph has no candidates and returns
// empty before any Dijkstra).
const input = {
nodeCount: 2,
nodeCount: 3,
edges: [
{ from: 0, to: 1, seconds: 10, flags: 0 }, // floor(10/0.0001) = 100000 quanta
{ from: 1, to: 0, seconds: 10, flags: 0 },
{ from: 1, to: 2, seconds: 10, flags: 0 },
{ from: 2, to: 1, seconds: 10, flags: 0 },
],
quantumS: 0.0001,
};