code wiki / _hdl_build / test_render_coherence.nx

test_render_coherence.nx

buildroot/runtime/_hdl_build/test_render_coherence.nx

3096 B48 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind tooltopic test
docsdependenciesstructsconstsfunctions

about

unit test for nx_render_coherence: the wet_without_context PREVENTATIVE. Proves (a) correct reframe strings, (b) the INTEGRATION win -- after repair, go_anatomy_risk no longer fires wet_token_no_wet_context (the #1 render bug removed).

dependencies 3 imports · 0 importers

nx_render_coherence.nx nx_anatomy_risk.nx nx_syscalls.nx test_render_coherence.nx

imports: nx_render_coherence.nxnx_anatomy_risk.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main check_repair sys_mmap go_coherence_repair ar_contains rc_wordmatch rc_is_letter rc_emit t_slen t_streq t_emit sys_write t_slen ↻ t_itoa sys_mmap ↻ check_integration sys_mmap ↻ go_anatomy_risk ar_contains ↻ ar_cat ar_count ar_wordcount t_slen ↻ go_coherence_repair ↻ t_emit ↻ t_itoa ↻ t_emit ↻

structs

none

consts

none

functions

7func t_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
8func t_streq(a: *u8, b: *u8) -> i64 { var i: i64=0; while a[i]!=(0 as u8) { if (a[i]&0xff)!=(b[i]&0xff) { return 0 } i=i+1 } if b[i]!=(0 as u8) { return 0 } return 1 }
called by 1: check_repair
9func t_itoa(dst: *u8, off: i64, v: i64) -> i64 { let t: *u8=sys_mmap(28); var m: i64=v; var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var o: i64=off; var q: i64=k-1; while q>=0{dst[o]=t[q];o=o+1;q=q-1} return o }
10func t_emit(s: *u8) -> i64 { sys_write(1, s, t_slen(s)); return 0 }
12func check_repair(prompt: *u8, want_out: *u8, want_fired: i64) -> i64
23func check_integration(prompt: *u8, want_before: i64, want_after: i64) -> i64
37func main() -> i64