36 lines
949 B
Go
36 lines
949 B
Go
package v2
|
|
|
|
import (
|
|
"context"
|
|
"runtime"
|
|
"testing"
|
|
|
|
"github.com/tetratelabs/wazero"
|
|
"github.com/tetratelabs/wazero/api"
|
|
"github.com/tetratelabs/wazero/internal/engine/wazevo"
|
|
"github.com/tetratelabs/wazero/internal/integration_test/spectest"
|
|
"github.com/tetratelabs/wazero/internal/platform"
|
|
)
|
|
|
|
const enabledFeatures = api.CoreFeaturesV2
|
|
|
|
func TestCompiler(t *testing.T) {
|
|
if !platform.CompilerSupported() {
|
|
t.Skip()
|
|
}
|
|
spectest.Run(t, Testcases, context.Background(), wazero.NewRuntimeConfigCompiler().WithCoreFeatures(enabledFeatures))
|
|
}
|
|
|
|
func TestInterpreter(t *testing.T) {
|
|
spectest.Run(t, Testcases, context.Background(), wazero.NewRuntimeConfigInterpreter().WithCoreFeatures(enabledFeatures))
|
|
}
|
|
|
|
func TestWazevo(t *testing.T) {
|
|
c := wazero.NewRuntimeConfigCompiler().WithCoreFeatures(enabledFeatures)
|
|
if runtime.GOARCH != "arm64" {
|
|
t.Skip()
|
|
}
|
|
wazevo.ConfigureWazevo(c)
|
|
spectest.Run(t, Testcases, context.Background(), c)
|
|
}
|