diff --git a/Tests/LibWasm/test-wasm.cpp b/Tests/LibWasm/test-wasm.cpp index d524239ebf..1584c2db40 100644 --- a/Tests/LibWasm/test-wasm.cpp +++ b/Tests/LibWasm/test-wasm.cpp @@ -80,8 +80,9 @@ private: static HashMap const& spec_test_namespace() { - if (!s_spec_test_namespace.is_empty()) - return s_spec_test_namespace; + Wasm::FunctionType print_type { {}, {} }; + auto address_print = alloc_noop_function(print_type); + s_spec_test_namespace.set({ "spectest", "print", print_type }, Wasm::ExternValue { *address_print }); Wasm::FunctionType print_i32_type { { Wasm::ValueType(Wasm::ValueType::I32) }, {} }; auto address_i32 = alloc_noop_function(print_i32_type);