forked from bytecodealliance/wasmtime-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig_test.go
29 lines (26 loc) · 876 Bytes
/
config_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package wasmtime
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestConfig(t *testing.T) {
NewConfig().SetDebugInfo(true)
NewConfig().SetWasmThreads(true)
NewConfig().SetWasmReferenceTypes(true)
NewConfig().SetWasmSIMD(true)
NewConfig().SetWasmBulkMemory(true)
NewConfig().SetWasmMultiValue(true)
NewConfig().SetWasmMultiMemory(true)
NewConfig().SetConsumeFuel(true)
NewConfig().SetStrategy(StrategyAuto)
NewConfig().SetStrategy(StrategyCranelift)
NewConfig().SetCraneliftDebugVerifier(true)
NewConfig().SetCraneliftOptLevel(OptLevelNone)
NewConfig().SetCraneliftOptLevel(OptLevelSpeed)
NewConfig().SetCraneliftOptLevel(OptLevelSpeedAndSize)
NewConfig().SetProfiler(ProfilingStrategyNone)
err := NewConfig().CacheConfigLoadDefault()
require.NoError(t, err)
err = NewConfig().CacheConfigLoad("nonexistent.toml")
require.Error(t, err)
}