github.com/bananabytelabs/wazero@v0.0.0-20240105073314-54b22a776da8/examples/concurrent-instantiation/main_test.go (about) 1 package main 2 3 import ( 4 "strconv" 5 "strings" 6 "testing" 7 8 "github.com/bananabytelabs/wazero/internal/testing/maintester" 9 "github.com/bananabytelabs/wazero/internal/testing/require" 10 ) 11 12 // Test_main ensures the following will work: 13 // 14 // go run main.go 15 func Test_main(t *testing.T) { 16 stdout, _ := maintester.TestMain(t, main, "main") 17 18 for i := 0; i < 50; i++ { 19 require.True(t, strings.Contains(stdout, strconv.Itoa(i*2))) 20 } 21 }