wa-lang.org/wazero@v1.0.2/internal/integration_test/spectest/v2/spec_test.go (about) 1 package spectest 2 3 import ( 4 "context" 5 "embed" 6 "testing" 7 8 "wa-lang.org/wazero/api" 9 "wa-lang.org/wazero/internal/engine/compiler" 10 "wa-lang.org/wazero/internal/engine/interpreter" 11 "wa-lang.org/wazero/internal/integration_test/spectest" 12 "wa-lang.org/wazero/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 20 21 func TestCompiler(t *testing.T) { 22 if !platform.CompilerSupported() { 23 t.Skip() 24 } 25 spectest.Run(t, testcases, context.Background(), compiler.NewEngine, enabledFeatures) 26 } 27 28 func TestInterpreter(t *testing.T) { 29 spectest.Run(t, testcases, context.Background(), interpreter.NewEngine, enabledFeatures) 30 }