Skip to content

Commit

Permalink
fix: use require to check for empty mempkg
Browse files Browse the repository at this point in the history
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
  • Loading branch information
gfanton committed Sep 1, 2023
1 parent f9f5442 commit e95076a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions gnovm/tests/package_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
// "go/build"

gno "github.com/gnolang/gno/gnovm/pkg/gnolang"
"github.com/jaekwon/testify/require"
)

func TestPackages(t *testing.T) {
Expand Down Expand Up @@ -60,9 +61,7 @@ func runPackageTest(t *testing.T, dir string, path string) {
t.Helper()

memPkg := gno.ReadMemPackage(dir, path)
if memPkg.IsEmpty() {
panic(fmt.Sprintf("found an empty package %q", path))
}
require.False(t, memPkg.IsEmpty())

stdin := new(bytes.Buffer)
// stdout := new(bytes.Buffer)
Expand Down

0 comments on commit e95076a

Please sign in to comment.