PathrockNetwork Gno Explorer
HomeBlocksTransactionsRealmsPackagesValidators

PathrockNetwork Gno Explorer — an independent explorer for Gno.land Mainnet (gnoland-1), operated by PathrockNetwork. Not an official Gno.land service.

gnowebarchive RPC

gno.land/p/gnoland/boards/v0

Package
Open in gnoweb ↗

Overview

Kind
Pure package
Name
v0
Namespace
gnoland / boards
Files
22 (gnomod.toml)
Exported functions
n/a — not supported for pure packages by the node (vm/qfuncs)
Module
gno.land/p/gnoland/boards/v0
gno
0.9

Files (22)

  • gnomod.tomltoml
  • board.gnogno
  • flag_storage.gnogno
  • id.gnogno
  • permission_set.gnogno
  • permissions.gnogno
  • post_storage.gnogno
  • post.gnogno
  • reply.gnogno
  • repost_storage.gnogno
  • storage.gnogno
  • thread.gnogno
  • board_test.gnogno
  • flag_storage_test.gnogno
  • id_test.gnogno
  • permission_set_test.gnogno
  • post_storage_test.gnogno
  • post_test.gnogno
  • reply_test.gnogno
  • repost_storage_test.gnogno
  • storage_test.gnogno
  • thread_test.gnogno
  • post_test.gnogno
    1package boards_test23import (4	"strings"5	"testing"67	"gno.land/p/nt/urequire/v0"89	"gno.land/p/gnoland/boards/v0"10)1112func TestPostSummary(t *testing.T) {13	post := &boards.Post{ID: 1, Body: strings.Repeat("X", 900)}14	summary := post.Summary()15	urequire.True(t, strings.HasSuffix(summary, "..."), "expect dotted suffix")16	urequire.True(t, len(summary) == 80, "expect summary length to match")17}1819func TestIsThread(t *testing.T) {20	post := &boards.Post{ID: 1, ThreadID: 1} // IDs match21	urequire.True(t, boards.IsThread(post), "expect post to be a thread")22	urequire.False(t, boards.IsThread(nil), "expect nil not to be a thread")2324	post = &boards.Post{ID: 2, ThreadID: 1} // IDs doesn't match25	urequire.False(t, boards.IsThread(post), "expect post not to be a thread")26}2728func TestIsRepost(t *testing.T) {29	post := &boards.Post{ID: 1, OriginalBoardID: 1} // Original board ID available30	urequire.True(t, boards.IsRepost(post), "expect post to be a repost")31	urequire.False(t, boards.IsRepost(nil), "expect nil not to be a repost")3233	post = &boards.Post{ID: 1} // Original board ID not available34	urequire.False(t, boards.IsRepost(post), "expect post not to be a repost")35}3637func TestSummaryOf(t *testing.T) {38	summary := boards.SummaryOf(strings.Repeat("X", 90), 80)39	urequire.True(t, strings.HasSuffix(summary, "..."), "expect dotted suffix")40	urequire.True(t, len(summary) == 80, "expect summary length to match")4142	summary = boards.SummaryOf(strings.Repeat(" ", 90), 80)43	urequire.Empty(t, summary, "expect summary to be empty")44}45

    Functions

    not supported for pure packages by the node (vm/qfuncs)

    Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.