@@ -107,10 +107,11 @@ impl ExportInfo for &wasmer::Module {
107107mod tests {
108108 use std:: str:: FromStr ;
109109
110+ use crate :: wasm_backend:: make_compiler_config;
110111 use crate :: VmError ;
111112
112113 use super :: * ;
113- use wasmer:: { Cranelift , Store } ;
114+ use wasmer:: Store ;
114115
115116 static CONTRACT : & [ u8 ] = include_bytes ! ( "../testdata/hackatom.wasm" ) ;
116117 static CORRUPTED : & [ u8 ] = include_bytes ! ( "../testdata/corrupted.wasm" ) ;
@@ -204,7 +205,7 @@ mod tests {
204205 #[ test]
205206 fn exported_function_names_works_for_wasmer_with_no_prefix ( ) {
206207 let wasm = wat:: parse_str ( r#"(module)"# ) . unwrap ( ) ;
207- let compiler = Cranelift :: default ( ) ;
208+ let compiler = make_compiler_config ( ) ;
208209 let store = Store :: new ( compiler) ;
209210 let module = wasmer:: Module :: new ( & store, wasm) . unwrap ( ) ;
210211 let exports = module. exported_function_names ( None ) ;
@@ -222,7 +223,7 @@ mod tests {
222223 )"# ,
223224 )
224225 . unwrap ( ) ;
225- let compiler = Cranelift :: default ( ) ;
226+ let compiler = make_compiler_config ( ) ;
226227 let store = Store :: new ( compiler) ;
227228 let module = wasmer:: Module :: new ( & store, wasm) . unwrap ( ) ;
228229 let exports = module. exported_function_names ( None ) ;
@@ -235,7 +236,7 @@ mod tests {
235236 #[ test]
236237 fn exported_function_names_works_for_wasmer_with_prefix ( ) {
237238 let wasm = wat:: parse_str ( r#"(module)"# ) . unwrap ( ) ;
238- let compiler = Cranelift :: default ( ) ;
239+ let compiler = make_compiler_config ( ) ;
239240 let store = Store :: new ( compiler) ;
240241 let module = wasmer:: Module :: new ( & store, wasm) . unwrap ( ) ;
241242 let exports = module. exported_function_names ( Some ( "b" ) ) ;
@@ -254,7 +255,7 @@ mod tests {
254255 )"# ,
255256 )
256257 . unwrap ( ) ;
257- let compiler = Cranelift :: default ( ) ;
258+ let compiler = make_compiler_config ( ) ;
258259 let store = Store :: new ( compiler) ;
259260 let module = wasmer:: Module :: new ( & store, wasm) . unwrap ( ) ;
260261 let exports = module. exported_function_names ( Some ( "b" ) ) ;
0 commit comments