Search Apps Documentation Source Content File Folder Download Copy Actions Download

z_22_e_filetest.gno

0.43 Kb ยท 24 lines
 1package main
 2
 3import (
 4	"testing"
 5
 6	boards2 "gno.land/r/gnoland/boards2/v1"
 7)
 8
 9const owner address = "g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq" // @devx
10
11func init() {
12	testing.SetRealm(testing.NewUserRealm(owner))
13	boards2.LockRealm(cross, true)
14}
15
16func main() {
17	testing.SetRealm(testing.NewUserRealm(owner))
18
19	// Should fail because realm is already locked
20	boards2.LockRealm(cross, true)
21}
22
23// Error:
24// realm and members are locked