Rather than clutter both the README and home page with details that can drift and have caused maintenance, this directs users to the tested basic example. This also adds a FAQ entry about TinyGo's main, thanks to @basvanbeek for the help. Signed-off-by: Adrian Cole <adrian@tetrate.io>
18 lines
361 B
Go
18 lines
361 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 add.go 7 9
|
|
func Test_main(t *testing.T) {
|
|
stdout, _ := maintester.TestMain(t, main, "add", "7", "9")
|
|
require.Equal(t, `7 + 9 = 16
|
|
`, stdout)
|
|
}
|