扩展解释器WASM基础夹具
结论:解释器核心WASM验证新增G53、进给模式、位置参数和探测语义夹具,并通过LinuxCNC解释器状态读回覆盖position_params。
This commit is contained in:
@@ -47,6 +47,10 @@ const fixtureNames = [
|
||||
"modal_incremental",
|
||||
"plane_selection",
|
||||
"coordinate_offsets",
|
||||
"g53_machine_coordinates",
|
||||
"feed_control_modes",
|
||||
"position_params",
|
||||
"probe_semantics",
|
||||
];
|
||||
|
||||
for (const fixtureName of fixtureNames) {
|
||||
@@ -60,16 +64,14 @@ for (const fixtureName of fixtureNames) {
|
||||
).trimEnd();
|
||||
|
||||
const output = runProgram(interp, programText);
|
||||
const actualEventSet = new Set(
|
||||
output.split("\n").filter((line) => line.startsWith("canon_event=")),
|
||||
);
|
||||
const expectedEventLines = expectedEvents.split("\n").filter(Boolean);
|
||||
const actualLineSet = new Set(output.split("\n").filter(Boolean));
|
||||
const expectedLines = expectedEvents.split("\n").filter(Boolean);
|
||||
|
||||
for (const expectedEvent of expectedEventLines) {
|
||||
for (const expectedLine of expectedLines) {
|
||||
assert.equal(
|
||||
actualEventSet.has(expectedEvent),
|
||||
actualLineSet.has(expectedLine),
|
||||
true,
|
||||
`${fixtureName}: ${expectedEvent}`,
|
||||
`${fixtureName}: ${expectedLine}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user