...
1 package v2
2
3 import (
4 "context"
5 "runtime"
6 "testing"
7
8 "github.com/tetratelabs/wazero"
9 "github.com/tetratelabs/wazero/api"
10 "github.com/tetratelabs/wazero/experimental/opt"
11 "github.com/tetratelabs/wazero/internal/integration_test/spectest"
12 "github.com/tetratelabs/wazero/internal/platform"
13 )
14
15 const enabledFeatures = api.CoreFeaturesV2
16
17 func TestCompiler(t *testing.T) {
18 if !platform.CompilerSupported() {
19 t.Skip()
20 }
21 spectest.Run(t, Testcases, context.Background(), wazero.NewRuntimeConfigCompiler().WithCoreFeatures(enabledFeatures))
22 }
23
24 func TestInterpreter(t *testing.T) {
25 spectest.Run(t, Testcases, context.Background(), wazero.NewRuntimeConfigInterpreter().WithCoreFeatures(enabledFeatures))
26 }
27
28 func TestWazevo(t *testing.T) {
29 if runtime.GOARCH != "arm64" {
30 t.Skip()
31 }
32 c := opt.NewRuntimeConfigOptimizingCompiler().WithCoreFeatures(enabledFeatures)
33 spectest.Run(t, Testcases, context.Background(), c)
34 }
35
View as plain text