package inittest // counter is set by init(), which `moxie test` must run before any test body: // the synthetic main it builds around this library is a main package, so a // program's rule (init() is not allowed in main) does not apply, and the // __varinit call alone left counter at zero. var counter int32 func init() { counter = 42 } func Counter() (n int32) { return counter }