From 4a2fc83776a19d358e8900166744ffc5f24209ea Mon Sep 17 00:00:00 2001 From: wangdequan Date: Mon, 8 Jun 2026 09:29:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=A9=E5=B1=95=E6=B5=8F=E8=A7=88=E5=99=A8?= =?UTF-8?q?=E8=A7=A3=E9=87=8A=E5=99=A8=20INI=20=E6=84=9F=E7=9F=A5=E8=A6=86?= =?UTF-8?q?=E7=9B=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 结论:浏览器解释器 smoke 现在通过 SDK/C ABI 覆盖 namedparam_semantics 的 INI-aware program ABI,并同步兼容性验证矩阵。 --- wasm-port/docs/compatibility-validation.md | 4 +++- wasm-port/tests/browser/interp_smoke.html | 23 +++++++++++++++------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/wasm-port/docs/compatibility-validation.md b/wasm-port/docs/compatibility-validation.md index d531e04..056ce41 100644 --- a/wasm-port/docs/compatibility-validation.md +++ b/wasm-port/docs/compatibility-validation.md @@ -242,7 +242,8 @@ for `minimal_linear`, `arc_semantics`, `length_units`, `modal_incremental`, `comment_logging`, `numbered_params`, `tool_semantics`, `tool_table_setup`, `tool_reload`, `canned_cycles`, `cutter_comp_motion`, `threading_sync`, `nurbs_g5_semantics`, `nurbs_g6_semantics`, `state_tag_motion`, -`canon_runtime_edges`, `program_end_modal_reset`, and `namedparam_semantics`, +`canon_runtime_edges`, `program_end_modal_reset`, and `namedparam_semantics` +through both Node WASM and browser INI-aware program ABI smoke coverage, plus the `g1_zero_feed`, `arc_radius_mismatch`, `arc_zero_radius`, `cutter_comp_plane_change`, `g53_incremental`, `namedparam_readonly`, `numbered_param_readonly`, `tool_not_found`, and @@ -372,6 +373,7 @@ Browser interpreter `Interp::execute()` coverage currently includes: - `canon_runtime_edges` - `tool_reload` - `program_end_modal_reset` +- `namedparam_semantics` through the INI-aware program ABI Browser interpreter negative coverage currently includes every fixture under `tests/fixtures/gcode_errors/`: diff --git a/wasm-port/tests/browser/interp_smoke.html b/wasm-port/tests/browser/interp_smoke.html index 30e6db8..c32a1cb 100644 --- a/wasm-port/tests/browser/interp_smoke.html +++ b/wasm-port/tests/browser/interp_smoke.html @@ -113,6 +113,20 @@ ); } + const namedParamIniPath = "/work/namedparams.ini"; + const namedParamProgramText = await fetchText( + `../fixtures/gcode/${INTERP_INI_FIXTURE}.ngc`, + ); + const namedParamExpectedText = ( + await fetchText(`../fixtures/canon/${INTERP_INI_FIXTURE}.events`) + ).trimEnd(); + interp.writeTextFile(namedParamIniPath, await fetchText("../fixtures/ini/namedparams.ini")); + verifyExpectedOutput( + INTERP_INI_FIXTURE, + interp.runProgramWithIni(namedParamProgramText, namedParamIniPath), + namedParamExpectedText, + ); + const positionParamsText = await fetchText( `../fixtures/gcode/${INTERP_POSITION_PARAMS_FILE_FIXTURE}.ngc`, ); @@ -138,17 +152,12 @@ ); } - const namedParamIniPath = "/work/namedparams.ini"; - interp.writeTextFile(namedParamIniPath, await fetchText("../fixtures/ini/namedparams.ini")); const namedParamPath = `/work/${INTERP_INI_FIXTURE}.ngc`; - interp.writeTextFile( - namedParamPath, - await fetchText(`../fixtures/gcode/${INTERP_INI_FIXTURE}.ngc`), - ); + interp.writeTextFile(namedParamPath, namedParamProgramText); verifyExpectedOutput( `${INTERP_INI_FIXTURE}_file`, interp.runFileWithIni(namedParamPath, namedParamIniPath), - (await fetchText(`../fixtures/canon/${INTERP_INI_FIXTURE}.events`)).trimEnd(), + namedParamExpectedText, ); await saveMachineTextFiles("browser-interp", {