diff --git a/gnovm/pkg/test/filetest.go b/gnovm/pkg/test/filetest.go index 32d7232b0da..077c2df5401 100644 --- a/gnovm/pkg/test/filetest.go +++ b/gnovm/pkg/test/filetest.go @@ -103,11 +103,12 @@ func (opts *TestOptions) runFiletest(filename string, source []byte) (string, er // The Error directive (and many others) will have one trailing newline, // which is not in the output - so add it there. match(errDirective, result.Error+"\n") - } else { + } else if result.Output != "" { outputDirective := dirs.First(DirectiveOutput) if outputDirective == nil { return "", fmt.Errorf("unexpected output: \n%s", result.Output) } + } else { err = m.CheckEmpty() if err != nil { return "", fmt.Errorf("machine not empty after main: %w", err) diff --git a/gnovm/tests/files/addressable_5.gno b/gnovm/tests/files/addressable_5.gno index 800cc744458..fa39ef42841 100644 --- a/gnovm/tests/files/addressable_5.gno +++ b/gnovm/tests/files/addressable_5.gno @@ -9,3 +9,6 @@ func main() { le := &binary.LittleEndian println(&le.AppendUint16(b, 0)[0]) } + +// Output: +// &(0 uint8) diff --git a/gnovm/tests/files/type_alias.gno b/gnovm/tests/files/type_alias.gno index e95c54126ec..09918f6d591 100644 --- a/gnovm/tests/files/type_alias.gno +++ b/gnovm/tests/files/type_alias.gno @@ -6,7 +6,8 @@ import "gno.land/p/demo/uassert" type TestingT = uassert.TestingT func main() { - println(TestingT) + println("ok") } -// No need for output; not panicking is passing. +// Output: +// ok diff --git a/gnovm/tests/files/types/eql_0f49.gno b/gnovm/tests/files/types/eql_0f49.gno index b5a4bf4ed05..b4d6f7e3972 100644 --- a/gnovm/tests/files/types/eql_0f49.gno +++ b/gnovm/tests/files/types/eql_0f49.gno @@ -14,6 +14,8 @@ func main() { } +// Output: +// true // true // true // true