code wiki / (root) / nx_ipp_codec_test.nx

nx_ipp_codec_test.nx

buildroot/runtime/nx_ipp_codec_test.nx

6445 B123 linesdepth 2pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic ipp
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_ipp_codec.nx nx_ipp_codec_test.nx

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

main sys_mmap nx_ipp_begin nx_ipp_put_u16 nx_ipp_put_u32 nx_ipp_op_id nx_ipp_get_u16 nx_ipp_request_id nx_ipp_get_u32 nx_ipp_group

structs

none

consts

none

functions

21func 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
23func main() -> i64