You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
WebCAD/__test__/FeedingToolPath/testPathCount.ts

19 lines
644 B

import { Board } from "../../src/DatabaseServices/Entity/Board";
import { FeedingToolPath } from "../../src/GraphicsSystem/ToolPath/FeedingToolPath";
export let feedUtil = FeedingToolPath.GetInstance() as FeedingToolPath;
export function testPathCount(br: Board, count?: number)
{
let cus = feedUtil.TestCalcPath(br);
if (count !== undefined)
expect(cus.length).toBe(count);
else
expect(cus.length).toBeGreaterThan(0);
let pathCount = cus.length;
expect(pathCount < 0 ? 0 : pathCount).toMatchSnapshot("走刀数量");
for (let cu of cus)
{
expect(cu.Length).toMatchNumberSnapshot();
}
}