nx_ipp_codec_test.nx
buildroot/runtime/nx_ipp_codec_test.nx
about
nx_ipp_codec_test.nx -- gate for the sovereign IPP/1.1 wire codec (R0).
Proves, with unique exit codes per invariant (no_silent_failure: you know exactly which broke):
1x encode a Get-Printer-Attributes request byte-exactly per RFC 8010 (lengths re-derived
independently in this test, header/group/end bytes spot-checked, total length asserted)
2x round-trip: parse every attribute back out by name, value bytes match
3x parse a STOPPED-printer response and surface printer-state(=5) + printer-state-reasons
('media-empty') -- the anti-silent-failure proof (Brother hides these; we surface them)
4x defensive liar-kill: truncated header and a value-length overrun both yield NX_IPP_MALFORMED
5x a missing attribute yields NX_IPP_NOT_FOUND (not a false hit, not MALFORMED)
All inputs are constructed from the RFC byte-layout rules, independent of the encoder's own code, so
a bug in the encoder cannot mask a bug in the parser or vice-versa.
expect_exit: 0
license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_ipp_codec.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
| 21 | func t_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } calls 1: sys_write |
| 23 | func main() -> i64 |