@@ -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" ) ;
@@ -201,7 +202,7 @@ mod tests {
201202 #[ test]
202203 fn exported_function_names_works_for_wasmer_with_no_prefix ( ) {
203204 let wasm = wat:: parse_str ( r#"(module)"# ) . unwrap ( ) ;
204- let compiler = Cranelift :: default ( ) ;
205+ let compiler = make_compiler_config ( ) ;
205206 let store = Store :: new ( compiler) ;
206207 let module = wasmer:: Module :: new ( & store, wasm) . unwrap ( ) ;
207208 let exports = module. exported_function_names ( None ) ;
@@ -219,7 +220,7 @@ mod tests {
219220 )"# ,
220221 )
221222 . unwrap ( ) ;
222- let compiler = Cranelift :: default ( ) ;
223+ let compiler = make_compiler_config ( ) ;
223224 let store = Store :: new ( compiler) ;
224225 let module = wasmer:: Module :: new ( & store, wasm) . unwrap ( ) ;
225226 let exports = module. exported_function_names ( None ) ;
@@ -232,7 +233,7 @@ mod tests {
232233 #[ test]
233234 fn exported_function_names_works_for_wasmer_with_prefix ( ) {
234235 let wasm = wat:: parse_str ( r#"(module)"# ) . unwrap ( ) ;
235- let compiler = Cranelift :: default ( ) ;
236+ let compiler = make_compiler_config ( ) ;
236237 let store = Store :: new ( compiler) ;
237238 let module = wasmer:: Module :: new ( & store, wasm) . unwrap ( ) ;
238239 let exports = module. exported_function_names ( Some ( "b" ) ) ;
@@ -251,7 +252,7 @@ mod tests {
251252 )"# ,
252253 )
253254 . unwrap ( ) ;
254- let compiler = Cranelift :: default ( ) ;
255+ let compiler = make_compiler_config ( ) ;
255256 let store = Store :: new ( compiler) ;
256257 let module = wasmer:: Module :: new ( & store, wasm) . unwrap ( ) ;
257258 let exports = module. exported_function_names ( Some ( "b" ) ) ;
0 commit comments