code wiki / _hdl_build / test_anatomy_risk.nx

test_anatomy_risk.nx

buildroot/runtime/_hdl_build/test_anatomy_risk.nx

2623 B37 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic test
docsdependenciesstructsconstsfunctions

about

unit test for nx_anatomy_risk: verifies score (x1000 weights) + fired factors per the ported anatomy_score_v2 model.

dependencies 2 imports · 0 importers

nx_anatomy_risk.nx nx_syscalls.nx test_anatomy_risk.nx

imports: nx_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 sys_mmap go_anatomy_risk ar_contains ar_cat ar_count ar_wordcount t_slen t_streq t_itoa sys_mmap ↻ sys_write sys_write ↻

structs

none

consts

none

functions

5func t_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: check
6func 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
7func 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 }
called by 1: check calls 1: sys_mmap
9func check(prompt: *u8, want_score: i64, want_factors: *u8) -> i64
26func main() -> i64
calls 2: checksys_write