feat(junction): close verified complex cores

This commit is contained in:
que01 committed 2026-09-09 09:15:58 +08:00
1 parent b4abfdb870
commit 88d8b841e5
5 files changed
+97 -25

No files matched your search

+11 -2
View File
@@ -91,7 +91,16 @@ const complexGeometry = compiler.nativeRoad.compileGeometry(
const complexCore = complexGeometry.roadSurface.features.find(
(feature) => feature.properties?.kind === 'complex-core' && feature.properties?.cluster_id === 'fixture-five-arm',
);
assert.equal(complexCore?.properties?.shape_kind, 'multi-arm');
assert.equal(complexCore?.properties?.arm_count, 5);
// This fixture contains multiple source carriageways within several arms. The
// compiler must retain those independent sections rather than filling their
// unknown interstitial areas with a synthetic core.
assert.equal(complexCore, undefined);
assert.ok(
complexGeometry.diagnostics.some(
(item) =>
item.rule === 'complex-junction-core-closure-unsupported' &&
item.subjectId === 'junction-cluster:fixture-five-arm',
),
);
assert.ok(complexGeometry.roadSurface.features.some((feature) => feature.properties?.kind === 'complex-approach'));
console.log('road compiler package tests passed');