github.com/wasilibs/wazerox@v0.0.0-20240124024944-4923be63ab5f/examples/concurrent-instantiation/main_test.go (about) 1 package main 2 3 import ( 4 "strconv" 5 "strings" 6 "testing" 7 8 "github.com/wasilibs/wazerox/internal/testing/maintester" 9 "github.com/wasilibs/wazerox/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 }