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

contract_test.gno

0.34 Kb · 20 lines
 1package wikicoin
 2
 3import (
 4	"testing"
 5
 6	"gno.land/p/nt/testutils/v0"
 7)
 8
 9func Test(cur realm, t *testing.T) {
10	test2 := testutils.TestAddress("test2")
11
12	mint := uint(1000)
13	Mint(cross(cur), test2, mint)
14
15	testing.SetOriginCaller(test2) // dropping privileges
16	bal := BalanceOf(test2)
17	if bal != mint {
18		t.Errorf("expected %d, got %d", mint, bal)
19	}
20}