Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
r3v4s committed Jul 10, 2023
1 parent fef095b commit f097de1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions examples/gno.land/r/demo/inner/inner_test.gno
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ var (

func TestOuterCallInner(t *testing.T) {
std.TestSetOrigCaller(oc)
shouldEQ(t, std.GetOrigCaller(), oc)
assertEqual(t, std.GetOrigCaller(), oc)

std.TestSetPrevRealm(or)
pr := std.PrevRealm()
shouldEQ(t, pr.Addr(), std.DerivePkgAddr(or))
shouldEQ(t, pr.PkgPath(), or)
shouldEQ(t, std.GetOrigCaller(), oc)
assertEqual(t, pr.Addr(), std.DerivePkgAddr(or))
assertEqual(t, pr.PkgPath(), or)
assertEqual(t, std.GetOrigCaller(), oc)
}

func shouldEQ(t *testing.T, got, want interface{}) {
func assertEqual(t *testing.T, got, want interface{}) {
if got != want {
t.Errorf("got %v, want %v", got, want)
}
Expand Down
4 changes: 2 additions & 2 deletions gnovm/tests/imports.go
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ func testPackageInjector(store gno.Store, pn *gno.PackageNode) {

switch arg0.T.String() {
case "std.Address":
// Set PrevRealm as an user
// Set PrevRealm as a caller
addr := arg0.GetString()
ctx := m.Context.(stdlibs.ExecContext)
ctx.OrigCaller = crypto.Bech32Address(addr)
Expand Down Expand Up @@ -609,7 +609,7 @@ func testPackageInjector(store gno.Store, pn *gno.PackageNode) {
}
default:
panic(
fmt.Sprintf("TestSetPrevRealm: invlaid type %v", arg0.T),
fmt.Sprintf("TestSetPrevRealm: invalid type %v", arg0.T),
)
}
},
Expand Down

0 comments on commit f097de1

Please sign in to comment.