github.com/tetratelabs/wazero@v1.7.3-0.20240513003603-48f702e154b5/examples/allocation/tinygo/greet_test.go (about) 1 package main 2 3 import ( 4 "testing" 5 6 "github.com/tetratelabs/wazero/internal/testing/maintester" 7 "github.com/tetratelabs/wazero/internal/testing/require" 8 ) 9 10 // Test_main ensures the following will work: 11 // 12 // go run greet.go wazero 13 func Test_main(t *testing.T) { 14 stdout, _ := maintester.TestMain(t, main, "greet", "wazero") 15 require.Equal(t, `wasm >> Hello, wazero! 16 go >> Hello, wazero! 17 `, stdout) 18 }