z_19_b_filetest.gno
0.58 Kb ยท 33 lines
1package main
2
3import (
4 "std"
5 "testing"
6
7 boards2 "gno.land/r/gnoland/boards2/v1"
8)
9
10const owner = std.Address("g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq") // @devx
11
12var (
13 bid boards2.BoardID
14 tid boards2.PostID
15)
16
17func init() {
18 testing.SetRealm(std.NewUserRealm(owner))
19 bid = boards2.CreateBoard(cross, "test123", false)
20 tid = boards2.CreateThread(cross, bid, "foo", "bar")
21
22 boards2.FreezeThread(cross, bid, tid)
23}
24
25func main() {
26 testing.SetRealm(std.NewUserRealm(owner))
27
28 // Attempt to freeze a frozen thread
29 boards2.FreezeThread(cross, bid, tid)
30}
31
32// Error:
33// thread is frozen