Search Apps Documentation Source Content File Folder Download Copy Actions Download

z4_filetest.gno

0.56 Kb · 23 lines
 1// PKGPATH: gno.land/r/tests/vm/z4_filetest
 2
 3package z4_filetest
 4
 5import (
 6	"chain"
 7	"testing"
 8
 9	tests "gno.land/r/tests/vm"
10)
11
12func main(cur realm) {
13	testing.SetOriginSend(chain.Coins{{Denom: "foo", Amount: 42}, {Denom: "ugnot", Amount: 100}})
14	println("tests.BankerOriginSend: " + tests.BankerOriginSend(cross(cur)))
15
16	// unsafe.OriginSend() always returns the origin send regardless of call
17	// depth.
18	println("tests.RTestsOriginSend: " + tests.RTestsOriginSend(cross(cur)))
19}
20
21// Output:
22// tests.BankerOriginSend: 42foo,100ugnot
23// tests.RTestsOriginSend: 42foo,100ugnot