wazevo: handle empty host module (#2125)

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
This commit is contained in:
Takeshi Yoneda
2024-03-06 15:59:18 +09:00
committed by GitHub
parent c692461032
commit d89236bc4d
2 changed files with 8 additions and 1 deletions

View File

@@ -308,7 +308,9 @@ func TestNewHostModuleBuilder_Compile(t *testing.T) {
tc := tt
t.Run(tc.name, func(t *testing.T) {
b := tc.input(NewRuntime(testCtx)).(*hostModuleBuilder)
cfg := NewRuntimeConfig()
cfg.(*runtimeConfig).EnableOptimizingCompiler()
b := tc.input(NewRuntimeWithConfig(testCtx, cfg)).(*hostModuleBuilder)
compiled, err := b.Compile(testCtx)
require.NoError(t, err)
m := compiled.(*compiledModule)