test(junction): enforce deterministic boundary planning
This commit is contained in:
1 parent
a090cb1e58
commit
103004b30a
1 file changed
+10
@@ -460,3 +460,13 @@ assert.deepEqual(
|
|||||||
sixArm.topology.carriageways.map((item) => item.key).sort(),
|
sixArm.topology.carriageways.map((item) => item.key).sort(),
|
||||||
'foreign junction plans must not contaminate selected cluster topology',
|
'foreign junction plans must not contaminate selected cluster topology',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const deterministicTopology = resolveJunctionBuildPlan(sixArm.model, sixArm.cluster, sixArm.helpers);
|
||||||
|
const deterministicGraph = buildJunctionBoundaryGraph(
|
||||||
|
deterministicTopology,
|
||||||
|
point(0, 0),
|
||||||
|
{ outerRadiusFor: () => 30, innerRadiusFor: () => 10 },
|
||||||
|
sixArm.helpers,
|
||||||
|
);
|
||||||
|
assert.deepEqual(deterministicTopology, sixArm.topology, 'repeated topology resolution must be deterministic');
|
||||||
|
assert.deepEqual(deterministicGraph, sixArmGraph, 'repeated boundary graph construction must be deterministic');
|
||||||
Reference in new issue
Block a user