| 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 counter.go |
| 13 | func Test_main(t *testing.T) { |
| 14 | stdout, _ := maintester.TestMain(t, main, "counter") |
| 15 | require.Equal(t, `m1 counter=0 |
| 16 | m2 counter=0 |
| 17 | m1 counter=1 |
| 18 | m2 counter=1 |
| 19 | `, stdout) |
| 20 | } |