wa-lang.org/wazero@v1.0.2/examples/multiple-results/multiple-results_test.go (about)

     1  package main
     2  
     3  import (
     4  	"testing"
     5  
     6  	"wa-lang.org/wazero/internal/testing/maintester"
     7  	"wa-lang.org/wazero/internal/testing/require"
     8  )
     9  
    10  // Test_main ensures the following will work:
    11  //
    12  //	go run multiple-results.go
    13  func Test_main(t *testing.T) {
    14  	stdout, _ := maintester.TestMain(t, main, "multiple-results")
    15  	require.Equal(t, `result-offset/wasm: age=37
    16  multi-value/wasm: age=37
    17  multi-value/imported_host: age=37
    18  `, stdout)
    19  }