code wiki / _hdl_build / _pe_draft_test.nx
_pe_draft_test.nx source
↩ module page · 14 lines · 508 B
1// AUTHORED BY THE NISHI BUILDER (pattern: STATE_FLOW test) -- KATs derived from the table itself
2import "_pe_draft.nx"
3import "nx_syscalls.nx"
4func main() -> i64 {
5 var bad: i64 = 0
6 if _pe_draft_step(0, 0) != 1 { bad = bad + 1 }
7 if _pe_draft_step(1, 0) != 1 { bad = bad + 1 }
8 if _pe_draft_step(1, 1) != 0 { bad = bad + 1 }
9 if _pe_draft_step(1, 2) != 0 { bad = bad + 1 }
10 if _pe_draft_step(0, 3) + 1 != 0 { bad = bad + 1 }
11 if bad == 0 { sys_exit(0) }
12 sys_exit(1)
13 return 1
14}