code wiki / (root) / nx_supp_ingredient_test.nx

nx_supp_ingredient_test.nx

buildroot/runtime/nx_supp_ingredient_test.nx

8032 B168 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic supp
docsdependenciesstructsconstsfunctions

about

nx_supp_ingredient_test.nx -- the gate this catalog never had. FOUND BY nx_gatescan, AND THE TOOL UNDERSTATED IT IN ONE WAY AND OVERSTATED IT IN ANOTHER, which is worth recording precisely. The scan reported nx_supp_ingredient as UNGATED-LOAD-BEARING with 6 consumers. Reading it showed the picture is more specific: a sibling's gate (nx_supp_formula_test) does import this file and exercises FOUR of its twelve functions -- so "ungated" was too strong, because name-based attribution cannot see a shared gate. But the four it exercises are si_name, si_density_mg_per_ml, si_capsule_fill_mg and si_cost_is_indicative -- the packaging and cost helpers. ★THE FUNCTIONS THAT DECIDE WHETHER A SUBSTANCE MAY LAWFULLY BE SOLD AT ALL -- si_class and si_is_lawful_dietary -- WERE EXERCISED BY NOTHING. Wave 5 of this lane called that legal gate "the product decision". The most consequential logic in the file was the least checked, which is the general shape of this defect class: coverage accumulates around whatever a sibling happened to need. So this gate deliberately does NOT re-test the four already covered. It tests the eight that nothing was checking, starting with the legal ones. expect_exit: 0 license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_supp_ingredient.nx nx_supp_ingredient_test.nx

imports: nx_syscalls.nxnx_supp_ingredient.nx

imported by: nobody (leaf or entry point)

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

main si_class tw sys_write si_is_lawful_dietary si_class ↻ tn sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_write ↻ si_valid_id si_clinical_dose_mg si_density_mg_per_ml si_cost_is_indicative si_cost_cents_per_kg si_name sys_exit ↻

structs

none

consts

none

functions

27func tw(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
28func tn(v: i64) -> i64 { let b: *u8 = sys_mmap(24); var m: i64 = v; if m < 0 { sys_write(1, "-" as *u8, 1); m = 0 - m } let t: *u8 = sys_mmap(24); 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 i: i64 = 0; while i < k { b[i] = t[k - 1 - i]; i = i + 1 } sys_write(1, b, k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
30func main() -> i64