diff --git a/test/junction-build-plan-counterexamples.js b/test/junction-build-plan-counterexamples.js index 593c0f7..0e7b74d 100644 --- a/test/junction-build-plan-counterexamples.js +++ b/test/junction-build-plan-counterexamples.js @@ -414,3 +414,20 @@ assert.deepEqual( translatedTopology.carriageways.map((item) => item.entrySection.feasibility), sixArm.topology.carriageways.map((item) => item.entrySection.feasibility), ); + +const tooShort = topology('too-short-transition', [ + { widthMeters: 6, line: [point(0, 0), point(0, 7)] }, + { widthMeters: 6, line: [point(0, 0), point(35, 0)] }, + { widthMeters: 6, line: [point(0, 0), point(-35, 0)] }, +]); +const tooShortGraph = buildJunctionBoundaryGraph( + tooShort.topology, + point(0, 0), + { outerRadiusFor: () => 24, innerRadiusFor: () => 10 }, + tooShort.helpers, +); +const tooShortSection = tooShortGraph.sections.find( + (section) => section.carriagewayKey === tooShort.topology.carriageways[0].key, +); +assert.equal(tooShortSection.transitionStatus, 'insufficient-source-length'); +assert.equal(tooShortSection.transitionMeters, 0);