feat: publish native road layer manifest
This commit is contained in:
@@ -11,6 +11,12 @@ assert.equal(typeof compiler.turnLaneArrows.buildCustomTurnLaneArrows, "function
|
||||
assert.equal(typeof compiler.complexJunction.buildComplexJunctionGeometry, "function");
|
||||
assert.equal(typeof compiler.nativeRoad.compileRoadModel, "function");
|
||||
assert.equal(typeof compiler.check.checkOutput, "function");
|
||||
assert.equal(typeof compiler.layerManifest.manifestForArea, "function");
|
||||
const manifest = compiler.layerManifest.manifestForArea("fixture");
|
||||
assert.equal(manifest.contract, "native-road-package/v1.1");
|
||||
assert.equal(manifest.layers.length, 12);
|
||||
assert.deepEqual(manifest.layers.filter((layer) => layer.role === "semantic").map((layer) => layer.source), ["lane_centerlines", "connectors"]);
|
||||
assert.equal(manifest.layers.find((layer) => layer.source === "center_lines").splitBy.cases[0].match, "white");
|
||||
const fixture = path.join(__dirname, "fixtures", "fengshu-er-road.osm");
|
||||
assert.ok(fs.existsSync(fixture));
|
||||
assert.throws(() => compiler.compiler.validateInput({ id: "area" }), /RoadCompilerInput/);
|
||||
|
||||
Reference in New Issue
Block a user