diff --git a/examples/gno.land/r/demo/boards2/z_2_a_filetest.gno b/examples/gno.land/r/demo/boards2/z_2_a_filetest.gno index 626438d0c0a..d95759e4236 100644 --- a/examples/gno.land/r/demo/boards2/z_2_a_filetest.gno +++ b/examples/gno.land/r/demo/boards2/z_2_a_filetest.gno @@ -16,7 +16,7 @@ func main() { bid := boards2.CreateBoard("test1") pid := boards2.CreateThread(bid, "thread", "thread") boards2.FlagThread(bid, pid, "reason") - rid := boards2.CreateReply(bid, pid, pid, "reply") + _ = boards2.CreateReply(bid, pid, pid, "reply") } // Error: diff --git a/examples/gno.land/r/demo/boards2/z_2_d_filetest.gno b/examples/gno.land/r/demo/boards2/z_2_d_filetest.gno new file mode 100644 index 00000000000..dbd809c84cd --- /dev/null +++ b/examples/gno.land/r/demo/boards2/z_2_d_filetest.gno @@ -0,0 +1,25 @@ +package main + +import ( + "std" + + "gno.land/r/demo/boards2" +) + +const owner = std.Address("g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5") // @test1 + +func init() { + std.TestSetOrigCaller(owner) +} + +func main() { + // Only single user per flag can't be tested atm, as flagThreshold = 1. + bid := boards2.CreateBoard("test1") + pid := boards2.CreateThread(bid, "thread", "thread") + + boards2.FlagThread(bid, pid, "reason1") + boards2.FlagThread(bid, pid, "reason2") +} + +// Error: +// item flag count threshold exceeded: 1