Add flowsnake interpreter regression coverage

This commit is contained in:
2026-06-09 07:49:06 +08:00
parent 3698c51917
commit e7df5b3eda
12 changed files with 530 additions and 4 deletions

View File

@@ -1249,6 +1249,28 @@ verifyExpectedOutput(
].join("\n"),
);
const flowsnakePath = writeInterpRegressionFile("flowsnake", "flowsnake.ngc");
verifyExpectedOutput(
"interp_flowsnake_wasm",
interp.runFile(flowsnakePath),
[
"file_open=0",
"file_read_count=6414",
"file_execute_count=6414",
"file_saw_error=0",
"canon_event=COMMENT: Program to mill a flowsnake",
"canon_event=START_SPINDLE_CLOCKWISE spindle=0",
"canon_event=STRAIGHT_TRAVERSE line=33 x=0.25 y=1 z=1",
"canon_event=STRAIGHT_FEED line=13 x=3.75 y=1 z=0",
"canon_event=STRAIGHT_FEED line=13 x=2 y=3.95 z=0",
"canon_event=STRAIGHT_FEED line=13 x=0.25 y=1 z=0",
"canon_event=STOP_SPINDLE_TURNING spindle=0",
"setup.current_x=0.25",
"setup.current_y=1",
"setup.current_z=1",
].join("\n"),
);
const g33_1Path = writeInterpRegressionFile("g33.1", "g33.1.ngc");
verifyExpectedOutput(
"interp_g33_1_wasm",