继续按 align-linuxcnc 约束:补齐重复 word reader 源码覆盖
结论:覆盖 LinuxCNC interp_read.cc 中剩余重复 A/B/C/D/E/I/J/K/P/Q/R/U/V/W word reader 错误;未扩展 smoke。 验证:./test-linuxcnc-source-link.sh;./test-native.sh。
This commit is contained in:
@@ -213,6 +213,6 @@ This matrix tracks LinuxCNC feature coverage for the web/WASM simulator. A featu
|
||||
| Probe moves `G38.2/G38.3/G38.4/G38.5` | covered as distinct probe events with LinuxCNC `probe_type` preserved through smoke, native, and source-linked paths | `tests/gcode/linuxcnc_probe_no_error.ngc` |
|
||||
| O-word subroutines, calls, and control flow | covered for numeric and named `O... sub/call/return/endsub` plus `if`/`elseif`/`else`, `while`, `repeat`, `do`/`while`, `break`, and `continue` through LinuxCNC file mode; smoke parser also covers named `O<name>` sub/call/return/endsub and loop-control forms | `tests/gcode/smoke_oword_subprogram.ngc`, `tests/gcode/linuxcnc_named_oword_subprogram.ngc`, `tests/gcode/linuxcnc_oword_control_flow.ngc` |
|
||||
| Parameter expressions and operators | covered for parameter references, source-linked `mod`, `**`, logical, and relational operator precedence, plus LinuxCNC parameter-setting syntax, divide-by-zero, negative-power, malformed `ATAN[]/[]`, unary operation syntax, `read_operation_unary()` unknown-word branches, `read_operation()` binary-operation prefix, unknown operation, and unclosed-expression error paths from `interp_read.cc`/`interp_execute.cc` | `tests/gcode/linuxcnc_parameter_expression_assignment.ngc`, `tests/gcode/linuxcnc_parameter_missing_equal_error.ngc`, `tests/gcode/linuxcnc_parameter_missing_value_error.ngc`, `tests/gcode/linuxcnc_expression_operators.ngc`, `tests/gcode/linuxcnc_divide_by_zero_error.ngc`, `tests/gcode/linuxcnc_negative_power_error.ngc`, `tests/gcode/linuxcnc_atan_missing_slash_error.ngc`, `tests/gcode/linuxcnc_atan_missing_bracket_error.ngc`, `tests/gcode/linuxcnc_unary_missing_bracket_error.ngc`, `tests/gcode/linuxcnc_unary_unknown_word_error.ngc`, `tests/gcode/linuxcnc_unary_unknown_c_word_error.ngc`, `tests/gcode/linuxcnc_unary_unknown_e_word_error.ngc`, `tests/gcode/linuxcnc_unary_unknown_f_word_error.ngc`, `tests/gcode/linuxcnc_unary_unknown_l_word_error.ngc`, `tests/gcode/linuxcnc_unary_unknown_r_word_error.ngc`, `tests/gcode/linuxcnc_unary_unknown_s_word_error.ngc`, `tests/gcode/linuxcnc_unary_unknown_t_word_error.ngc`, `tests/gcode/linuxcnc_unary_unknown_default_word_error.ngc`, `tests/gcode/linuxcnc_binary_unknown_a_operation_error.ngc`, `tests/gcode/linuxcnc_binary_unknown_e_operation_error.ngc`, `tests/gcode/linuxcnc_binary_unknown_g_operation_error.ngc`, `tests/gcode/linuxcnc_binary_unknown_l_operation_error.ngc`, `tests/gcode/linuxcnc_binary_unknown_m_operation_error.ngc`, `tests/gcode/linuxcnc_binary_unknown_n_operation_error.ngc`, `tests/gcode/linuxcnc_binary_unknown_o_operation_error.ngc`, `tests/gcode/linuxcnc_binary_unknown_x_operation_error.ngc`, `tests/gcode/linuxcnc_binary_unknown_operation_error.ngc`, `tests/gcode/linuxcnc_unclosed_expression_error.ngc` |
|
||||
| Word reader validation | source-linked LinuxCNC reader errors covered for negative `F/G/H/L/M/S/T` values and repeated `F/H/L/S/T/X/Y/Z` words from `interp_read.cc` | `tests/gcode/linuxcnc_negative_f_word_error.ngc`, `tests/gcode/linuxcnc_negative_g_code_error.ngc`, `tests/gcode/linuxcnc_negative_h_word_error.ngc`, `tests/gcode/linuxcnc_negative_l_word_error.ngc`, `tests/gcode/linuxcnc_negative_m_code_error.ngc`, `tests/gcode/linuxcnc_negative_s_word_error.ngc`, `tests/gcode/linuxcnc_negative_t_word_error.ngc`, `tests/gcode/linuxcnc_multiple_f_words_error.ngc`, `tests/gcode/linuxcnc_multiple_h_words_error.ngc`, `tests/gcode/linuxcnc_multiple_l_words_error.ngc`, `tests/gcode/linuxcnc_multiple_s_words_error.ngc`, `tests/gcode/linuxcnc_multiple_t_words_error.ngc`, `tests/gcode/linuxcnc_multiple_x_words_error.ngc`, `tests/gcode/linuxcnc_multiple_y_words_error.ngc`, `tests/gcode/linuxcnc_multiple_z_words_error.ngc` |
|
||||
| Word reader validation | source-linked LinuxCNC reader errors covered for negative `F/G/H/L/M/S/T` values and repeated `A/B/C/D/E/F/H/I/J/K/L/P/Q/R/S/T/U/V/W/X/Y/Z` words from `interp_read.cc` | `tests/gcode/linuxcnc_negative_f_word_error.ngc`, `tests/gcode/linuxcnc_negative_g_code_error.ngc`, `tests/gcode/linuxcnc_negative_h_word_error.ngc`, `tests/gcode/linuxcnc_negative_l_word_error.ngc`, `tests/gcode/linuxcnc_negative_m_code_error.ngc`, `tests/gcode/linuxcnc_negative_s_word_error.ngc`, `tests/gcode/linuxcnc_negative_t_word_error.ngc`, `tests/gcode/linuxcnc_multiple_a_words_error.ngc`, `tests/gcode/linuxcnc_multiple_b_words_error.ngc`, `tests/gcode/linuxcnc_multiple_c_words_error.ngc`, `tests/gcode/linuxcnc_multiple_d_words_error.ngc`, `tests/gcode/linuxcnc_multiple_e_words_error.ngc`, `tests/gcode/linuxcnc_multiple_f_words_error.ngc`, `tests/gcode/linuxcnc_multiple_h_words_error.ngc`, `tests/gcode/linuxcnc_multiple_i_words_error.ngc`, `tests/gcode/linuxcnc_multiple_j_words_error.ngc`, `tests/gcode/linuxcnc_multiple_k_words_error.ngc`, `tests/gcode/linuxcnc_multiple_l_words_error.ngc`, `tests/gcode/linuxcnc_multiple_p_words_error.ngc`, `tests/gcode/linuxcnc_multiple_q_words_error.ngc`, `tests/gcode/linuxcnc_multiple_r_words_error.ngc`, `tests/gcode/linuxcnc_multiple_s_words_error.ngc`, `tests/gcode/linuxcnc_multiple_t_words_error.ngc`, `tests/gcode/linuxcnc_multiple_u_words_error.ngc`, `tests/gcode/linuxcnc_multiple_v_words_error.ngc`, `tests/gcode/linuxcnc_multiple_w_words_error.ngc`, `tests/gcode/linuxcnc_multiple_x_words_error.ngc`, `tests/gcode/linuxcnc_multiple_y_words_error.ngc`, `tests/gcode/linuxcnc_multiple_z_words_error.ngc` |
|
||||
| Broader canned cycles `G73`, `G74`, `G82`-`G89` | partially covered: `G73`, `G74`, `G82`, `G83`, `G84`, `G85`, `G86`, `G87`, `G88`, `G89`; smoke parser maps supported cycles across `G17/G18/G19`, including LinuxCNC's special non-XY `G74/G84` tapping argument order and `G87` plane-specific `I/J/K` mapping; native/source regressions now check non-XY `G74/G84/G86/G87/G88` sequences | `tests/gcode/linuxcnc_canned_cycles_extended.ngc`, `tests/gcode/linuxcnc_canned_cycle_planes.ngc`, smoke API regression |
|
||||
| Full source-level wasm build | covered for the current wasm-safe RS274 source set, with remaining work focused on broadening browser-hostile dependency replacement and feature coverage | `./build-wasm.sh`, `test-linuxcnc-wasm-runtime-link.sh`, `test-web-wasm-node-smoke.sh`, `test-web-wasm-browser-smoke.sh` |
|
||||
|
||||
@@ -713,11 +713,25 @@ done
|
||||
# the word-specific reader functions reject repeated words while
|
||||
# filling a single block.
|
||||
multiple_word_error_cases=(
|
||||
"linuxcnc_multiple_a_words_error|Multiple a words on one line"
|
||||
"linuxcnc_multiple_b_words_error|Multiple b words on one line"
|
||||
"linuxcnc_multiple_c_words_error|Multiple c words on one line"
|
||||
"linuxcnc_multiple_d_words_error|Multiple d words on one line"
|
||||
"linuxcnc_multiple_e_words_error|Multiple e words on one line"
|
||||
"linuxcnc_multiple_f_words_error|Multiple f words on one line"
|
||||
"linuxcnc_multiple_h_words_error|Multiple h words on one line"
|
||||
"linuxcnc_multiple_i_words_error|Multiple i words on one line"
|
||||
"linuxcnc_multiple_j_words_error|Multiple j words on one line"
|
||||
"linuxcnc_multiple_k_words_error|Multiple k words on one line"
|
||||
"linuxcnc_multiple_l_words_error|Multiple l words on one line"
|
||||
"linuxcnc_multiple_p_words_error|Multiple p words on one line"
|
||||
"linuxcnc_multiple_q_words_error|Multiple q words on one line"
|
||||
"linuxcnc_multiple_r_words_error|Multiple r words on one line"
|
||||
"linuxcnc_multiple_s_words_error|Multiple s words on one line"
|
||||
"linuxcnc_multiple_t_words_error|Multiple t words on one line"
|
||||
"linuxcnc_multiple_u_words_error|Multiple U words on one line"
|
||||
"linuxcnc_multiple_v_words_error|Multiple V words on one line"
|
||||
"linuxcnc_multiple_w_words_error|Multiple W words on one line"
|
||||
"linuxcnc_multiple_x_words_error|Multiple x words on one line"
|
||||
"linuxcnc_multiple_y_words_error|Multiple y words on one line"
|
||||
"linuxcnc_multiple_z_words_error|Multiple z words on one line"
|
||||
|
||||
1
tests/gcode/linuxcnc_multiple_a_words_error.ngc
Normal file
1
tests/gcode/linuxcnc_multiple_a_words_error.ngc
Normal file
@@ -0,0 +1 @@
|
||||
G1 A1 A2 F100
|
||||
1
tests/gcode/linuxcnc_multiple_b_words_error.ngc
Normal file
1
tests/gcode/linuxcnc_multiple_b_words_error.ngc
Normal file
@@ -0,0 +1 @@
|
||||
G1 B1 B2 F100
|
||||
1
tests/gcode/linuxcnc_multiple_c_words_error.ngc
Normal file
1
tests/gcode/linuxcnc_multiple_c_words_error.ngc
Normal file
@@ -0,0 +1 @@
|
||||
G1 C1 C2 F100
|
||||
1
tests/gcode/linuxcnc_multiple_d_words_error.ngc
Normal file
1
tests/gcode/linuxcnc_multiple_d_words_error.ngc
Normal file
@@ -0,0 +1 @@
|
||||
D1 D2
|
||||
1
tests/gcode/linuxcnc_multiple_e_words_error.ngc
Normal file
1
tests/gcode/linuxcnc_multiple_e_words_error.ngc
Normal file
@@ -0,0 +1 @@
|
||||
E1 E2
|
||||
1
tests/gcode/linuxcnc_multiple_i_words_error.ngc
Normal file
1
tests/gcode/linuxcnc_multiple_i_words_error.ngc
Normal file
@@ -0,0 +1 @@
|
||||
G2 X1 Y0 I0 I1 J0 F100
|
||||
1
tests/gcode/linuxcnc_multiple_j_words_error.ngc
Normal file
1
tests/gcode/linuxcnc_multiple_j_words_error.ngc
Normal file
@@ -0,0 +1 @@
|
||||
G2 X1 Y0 I0 J0 J1 F100
|
||||
1
tests/gcode/linuxcnc_multiple_k_words_error.ngc
Normal file
1
tests/gcode/linuxcnc_multiple_k_words_error.ngc
Normal file
@@ -0,0 +1 @@
|
||||
K1 K2
|
||||
1
tests/gcode/linuxcnc_multiple_p_words_error.ngc
Normal file
1
tests/gcode/linuxcnc_multiple_p_words_error.ngc
Normal file
@@ -0,0 +1 @@
|
||||
P1 P2
|
||||
1
tests/gcode/linuxcnc_multiple_q_words_error.ngc
Normal file
1
tests/gcode/linuxcnc_multiple_q_words_error.ngc
Normal file
@@ -0,0 +1 @@
|
||||
Q1 Q2
|
||||
1
tests/gcode/linuxcnc_multiple_r_words_error.ngc
Normal file
1
tests/gcode/linuxcnc_multiple_r_words_error.ngc
Normal file
@@ -0,0 +1 @@
|
||||
R1 R2
|
||||
1
tests/gcode/linuxcnc_multiple_u_words_error.ngc
Normal file
1
tests/gcode/linuxcnc_multiple_u_words_error.ngc
Normal file
@@ -0,0 +1 @@
|
||||
G1 U1 U2 F100
|
||||
1
tests/gcode/linuxcnc_multiple_v_words_error.ngc
Normal file
1
tests/gcode/linuxcnc_multiple_v_words_error.ngc
Normal file
@@ -0,0 +1 @@
|
||||
G1 V1 V2 F100
|
||||
1
tests/gcode/linuxcnc_multiple_w_words_error.ngc
Normal file
1
tests/gcode/linuxcnc_multiple_w_words_error.ngc
Normal file
@@ -0,0 +1 @@
|
||||
G1 W1 W2 F100
|
||||
Reference in New Issue
Block a user