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