// PKGPATH: gno.land/r/gnoland/boards2/v1/filetests/z_hub_8_a_filetest // Test getting replies from a comment without replies package z_hub_8_a_filetest import ( "testing" boards2 "gno.land/r/gnoland/boards2/v1" ) var comment boards2.Comment func init(cur realm) { testing.SetRealm(testing.NewUserRealm("g1rp7cmetn27eqlpjpc4vuusf8kaj746tysc0qgh")) boardID := boards2.CreateBoard(cross(cur), "test123", false, false) threadID := boards2.CreateThread(cross(cur), boardID, "Title", "Body") commentID := boards2.CreateReply(cross(cur), boardID, threadID, 0, "Comment") // Get readonly comment comment, _ = boards2.GetComment(uint64(boardID), uint64(threadID), uint64(commentID)) } func main(cur realm) { replies := boards2.GetReplies(comment.BoardID(), comment.ThreadID(), comment.ID(), 0, comment.ReplyCount()) println(len(replies)) } // Output: // 0