继续按 align-linuxcnc 约束:补表达式运算源码回归
This commit is contained in:
@@ -586,6 +586,12 @@ CNC_SIM_RS274_FILE_MODE=1 CNC_SIM_RS274_VAR="$var_file" \
|
||||
CNC_SIM_RS274_FILE_MODE=1 CNC_SIM_RS274_VAR="$var_file" \
|
||||
"$build_dir/linuxcnc_rs274_source_dump" tests/gcode/linuxcnc_parameter_expression_assignment.ngc \
|
||||
>"$output_dir/cnc_sim_linuxcnc_source_parameter_expression_assignment.json"
|
||||
# Source basis: LinuxCNC src/emc/rs274ngc/interp_read.cc read_operation()
|
||||
# parses mod, power, logical, and relational operators; interp_execute.cc
|
||||
# execute_binary1()/execute_binary2() evaluate their precedence and values.
|
||||
CNC_SIM_RS274_FILE_MODE=1 CNC_SIM_RS274_VAR="$var_file" \
|
||||
"$build_dir/linuxcnc_rs274_source_dump" tests/gcode/linuxcnc_expression_operators.ngc \
|
||||
>"$output_dir/cnc_sim_linuxcnc_source_expression_operators.json"
|
||||
CNC_SIM_RS274_FILE_MODE=1 CNC_SIM_RS274_VAR="$var_file" \
|
||||
"$build_dir/linuxcnc_rs274_source_dump" tests/gcode/linuxcnc_word_bracket_whitespace.ngc \
|
||||
>"$output_dir/cnc_sim_linuxcnc_source_word_bracket_whitespace.json"
|
||||
@@ -2021,6 +2027,27 @@ if not any(
|
||||
):
|
||||
raise SystemExit("missing source-linked whitespace-insensitive word value motion")
|
||||
|
||||
expression_operators = json.loads((OUTPUT_DIR / "cnc_sim_linuxcnc_source_expression_operators.json").read_text())
|
||||
if not any(
|
||||
event["type"] == "rapid" and
|
||||
event["line"] == 6 and
|
||||
event["end"]["x"] == 3 and
|
||||
event["end"]["y"] == 16 and
|
||||
event["end"]["z"] == 1 and
|
||||
event["end"]["a"] == 1
|
||||
for event in expression_operators
|
||||
):
|
||||
raise SystemExit("missing source-linked expression mod/power/logical/relational motion")
|
||||
if not any(
|
||||
event["type"] == "rapid" and
|
||||
event["line"] == 10 and
|
||||
event["end"]["b"] == 19 and
|
||||
event["end"]["c"] == 2 and
|
||||
event["end"]["u"] == 1
|
||||
for event in expression_operators
|
||||
):
|
||||
raise SystemExit("missing source-linked expression precedence and relational branch motion")
|
||||
|
||||
word_bracket_whitespace = json.loads((OUTPUT_DIR / "cnc_sim_linuxcnc_source_word_bracket_whitespace.json").read_text())
|
||||
if not any(
|
||||
event["type"] == "linear-feed" and
|
||||
|
||||
Reference in New Issue
Block a user