@@ -107,10 +107,11 @@ impl ExportInfo for &wasmer::Module {
107
107
mod tests {
108
108
use std:: str:: FromStr ;
109
109
110
+ use crate :: wasm_backend:: make_compiler_config;
110
111
use crate :: VmError ;
111
112
112
113
use super :: * ;
113
- use wasmer:: { Cranelift , Store } ;
114
+ use wasmer:: Store ;
114
115
115
116
static CONTRACT : & [ u8 ] = include_bytes ! ( "../testdata/hackatom.wasm" ) ;
116
117
static CORRUPTED : & [ u8 ] = include_bytes ! ( "../testdata/corrupted.wasm" ) ;
@@ -201,7 +202,7 @@ mod tests {
201
202
#[ test]
202
203
fn exported_function_names_works_for_wasmer_with_no_prefix ( ) {
203
204
let wasm = wat:: parse_str ( r#"(module)"# ) . unwrap ( ) ;
204
- let compiler = Cranelift :: default ( ) ;
205
+ let compiler = make_compiler_config ( ) ;
205
206
let store = Store :: new ( compiler) ;
206
207
let module = wasmer:: Module :: new ( & store, wasm) . unwrap ( ) ;
207
208
let exports = module. exported_function_names ( None ) ;
@@ -219,7 +220,7 @@ mod tests {
219
220
)"# ,
220
221
)
221
222
. unwrap ( ) ;
222
- let compiler = Cranelift :: default ( ) ;
223
+ let compiler = make_compiler_config ( ) ;
223
224
let store = Store :: new ( compiler) ;
224
225
let module = wasmer:: Module :: new ( & store, wasm) . unwrap ( ) ;
225
226
let exports = module. exported_function_names ( None ) ;
@@ -232,7 +233,7 @@ mod tests {
232
233
#[ test]
233
234
fn exported_function_names_works_for_wasmer_with_prefix ( ) {
234
235
let wasm = wat:: parse_str ( r#"(module)"# ) . unwrap ( ) ;
235
- let compiler = Cranelift :: default ( ) ;
236
+ let compiler = make_compiler_config ( ) ;
236
237
let store = Store :: new ( compiler) ;
237
238
let module = wasmer:: Module :: new ( & store, wasm) . unwrap ( ) ;
238
239
let exports = module. exported_function_names ( Some ( "b" ) ) ;
@@ -251,7 +252,7 @@ mod tests {
251
252
)"# ,
252
253
)
253
254
. unwrap ( ) ;
254
- let compiler = Cranelift :: default ( ) ;
255
+ let compiler = make_compiler_config ( ) ;
255
256
let store = Store :: new ( compiler) ;
256
257
let module = wasmer:: Module :: new ( & store, wasm) . unwrap ( ) ;
257
258
let exports = module. exported_function_names ( Some ( "b" ) ) ;
0 commit comments