Files
wazero/imports/assemblyscript/example/assemblyscript_test.go
Crypt Keeper 5bd521eb3c Moves host function imports into their own directory (#784)
Our root directory is getting crowded and it is also difficult to
organize the "host imports" concept due to this.

This moves common and language-specific imports into their own
directory. This will break go import signatures on the next release, but
is more sustainable overall.

Signed-off-by: Adrian Cole <adrian@tetrate.io>
2022-08-31 10:22:15 +08:00

18 lines
455 B
Go

package main
import (
"testing"
"github.com/tetratelabs/wazero/internal/testing/maintester"
"github.com/tetratelabs/wazero/internal/testing/require"
)
// Test_main ensures the following will work:
//
// go run assemblyscript.go 7
func Test_main(t *testing.T) {
stdout, stderr := maintester.TestMain(t, main, "assemblyscript", "7")
require.Equal(t, "hello_world returned: 10", stdout)
require.Equal(t, "sad sad world at index.ts:7:3\n", stderr)
}