code wiki / _hdl_build / consent_step_test.nx
consent_step_test.nx source
↩ module page · 14 lines · 464 B
1// AUTHORED BY THE NISHI BUILDER (pattern: STATE_MACHINE test) -- KATs computed from the table at emit time
2import "consent_step.nx"
3import "nx_syscalls.nx"
4func main() -> i64 {
5 let ev: *i64 = sys_mmap(128) as *i64
6 ev[0] = 0
7 ev[1] = 1
8 if consent_step_run(ev, 2, 0) == 2 {
9 if consent_step_step(0, 1) == 0 - 1 {
10 if consent_step_step(4, 0) == 0 - 1 {
11 if consent_step_run(ev, 2, 0) == 2 { sys_exit(0) } } } }
12 sys_exit(1)
13 return 1
14}