Files
wazero/examples/assemblyscript/assemblyscript_test.go
Crypt Keeper f2b141ef9c Updates to AssemblyScript 0.21 which no longer includes WASI (#776)
This updates to AssemblyScript 0.21 which no longer includes WASI. This
updates guidance to use the shim, which I verified works.

Signed-off-by: Adrian Cole <adrian@tetrate.io>
2022-08-29 16:55:32 +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)
}