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