github.com/tetratelabs/wazero@v1.2.1/internal/integration_test/spectest/v2/spec_test.go (about)

     1  package spectest
     2  
     3  import (
     4  	"context"
     5  	"embed"
     6  	"testing"
     7  
     8  	"github.com/tetratelabs/wazero"
     9  	"github.com/tetratelabs/wazero/api"
    10  	"github.com/tetratelabs/wazero/internal/integration_test/spectest"
    11  	"github.com/tetratelabs/wazero/internal/platform"
    12  )
    13  
    14  //go:embed testdata/*.wasm
    15  //go:embed testdata/*.json
    16  var testcases embed.FS
    17  
    18  const enabledFeatures = api.CoreFeaturesV2
    19  
    20  func TestCompiler(t *testing.T) {
    21  	if !platform.CompilerSupported() {
    22  		t.Skip()
    23  	}
    24  	spectest.Run(t, testcases, context.Background(), wazero.NewRuntimeConfigCompiler().WithCoreFeatures(enabledFeatures))
    25  }
    26  
    27  func TestInterpreter(t *testing.T) {
    28  	spectest.Run(t, testcases, context.Background(), wazero.NewRuntimeConfigInterpreter().WithCoreFeatures(enabledFeatures))
    29  }