wa-lang.org/wazero@v1.0.2/imports/assemblyscript/example/assemblyscript_test.go (about) 1 package main 2 3 import ( 4 "testing" 5 6 "wa-lang.org/wazero/internal/testing/maintester" 7 "wa-lang.org/wazero/internal/testing/require" 8 ) 9 10 // Test_main ensures the following will work: 11 // 12 // go run assemblyscript.go 7 13 func Test_main(t *testing.T) { 14 stdout, stderr := maintester.TestMain(t, main, "assemblyscript", "7") 15 require.Equal(t, "hello_world returned: 10", stdout) 16 require.Equal(t, "sad sad world at index.ts:7:3\n", stderr) 17 }