nx_klipper_gcode_validator_test.nx
buildroot/runtime/nx_klipper_gcode_validator_test.nx
about
nx_klipper_gcode_validator_test.nx -- exercise the Klipper grammar
validator + verify the slicer's emitted G-code passes.
Closed-form invariants:
(a) Empty input -> BAD_INPUT
(b) Single valid line "G1 X10 Y20 E0.5 F1500\n" -> OK
(c) Comment line ";LAYER 5\n" -> OK
(d) Line missing command number "G\n" -> BAD_LINE
(e) Line with control char "G1\x01X10\n" -> BAD_CONTROL_CHAR
(f) Line with negative feedrate "G1 F-100\n" -> BAD_FEEDRATE
(g) Line with zero feedrate "G1 F0\n" -> BAD_FEEDRATE
(h) Line with bad parameter "G1 q10\n" (lowercase letter) -> BAD_PARAM
(i) Real emitted G-code from the slicer passes
expect_exit: 0
license_tier: ORIGINAL
dependencies 7 imports · 0 importers
imports: nx_syscalls.nxnx_mesh.nxnx_machine_graph.nxnx_material_profile.nxnx_gcode_emit.nxnx_slice_pipeline.nxnx_klipper_gcode_validator.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 26 | func put_str(dst: *u8, src: *u8) -> i64 called by 1: main |
| 35 | func main() -> i64 |