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>
18 lines
455 B
Go
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)
|
|
}
|