code wiki / (root) / nx_color_meter_test.nx

nx_color_meter_test.nx

buildroot/runtime/nx_color_meter_test.nx

2872 B62 linesdepth 2pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic color
docsdependenciesstructsconstsfunctions

about

nx_color_meter_test.nx -- gate for per-color (CMYK) toner coverage (nx_color_meter). Pure-color KATs prove the GCR separation is honest; unique exit codes per invariant: 1-4 cyan(0,255,255) -> C only 5-8 black(0,0,0) -> K only (GCR pulls gray->black toner) 10-13 white -> nothing 20-23 red(255,0,0) -> M + Y 30 50% gray -> K ~= 498039 ppm (~50%) 40-43 per-color ISO-19798 ledger + status expect_exit: 0 ; license_tier: ORIGINAL ; genealogy_id: project-printer-management-ipp-sclass-2026-06-20

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_color_meter.nx nx_color_meter_test.nx

imports: nx_syscalls.nxnx_color_meter.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 px nx_color_coverage nx_color_remaining_bp nx_color_status t_puts sys_write

structs

none

consts

none

functions

11func 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 }
called by 1: main calls 1: sys_write
13func px(rgb: *u8, r: i64, g: i64, b: i64) -> i64 { rgb[0] = r as u8; rgb[1] = g as u8; rgb[2] = b as u8; return 0 }
called by 1: main
15func main() -> i64