Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

z_hub_6_a_filetest.gno

0.66 Kb · 31 lines
 1// PKGPATH: gno.land/r/gnoland/boards2/v1/filetests/z_hub_6_a_filetest
 2
 3// Test getting flags from an unflagged thread
 4package z_hub_6_a_filetest
 5
 6import (
 7	"testing"
 8
 9	"gno.land/p/gnoland/boards"
10
11	boards2 "gno.land/r/gnoland/boards2/v1"
12)
13
14var (
15	boardID  boards.ID
16	threadID boards.ID
17)
18
19func init(cur realm) {
20	testing.SetRealm(testing.NewUserRealm("g1rp7cmetn27eqlpjpc4vuusf8kaj746tysc0qgh"))
21	boardID = boards2.CreateBoard(cross(cur), "test123", false, false)
22	threadID = boards2.CreateThread(cross(cur), boardID, "Title", "Body")
23}
24
25func main(cur realm) {
26	flags := boards2.GetFlags(uint64(boardID), uint64(threadID), 0, 0, 1)
27	println(len(flags))
28}
29
30// Output:
31// 0