@@ -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" ) ;
@@ -204,7 +205,7 @@ mod tests {
204
205
#[ test]
205
206
fn exported_function_names_works_for_wasmer_with_no_prefix ( ) {
206
207
let wasm = wat:: parse_str ( r#"(module)"# ) . unwrap ( ) ;
207
- let compiler = Cranelift :: default ( ) ;
208
+ let compiler = make_compiler_config ( ) ;
208
209
let store = Store :: new ( compiler) ;
209
210
let module = wasmer:: Module :: new ( & store, wasm) . unwrap ( ) ;
210
211
let exports = module. exported_function_names ( None ) ;
@@ -222,7 +223,7 @@ mod tests {
222
223
)"# ,
223
224
)
224
225
. unwrap ( ) ;
225
- let compiler = Cranelift :: default ( ) ;
226
+ let compiler = make_compiler_config ( ) ;
226
227
let store = Store :: new ( compiler) ;
227
228
let module = wasmer:: Module :: new ( & store, wasm) . unwrap ( ) ;
228
229
let exports = module. exported_function_names ( None ) ;
@@ -235,7 +236,7 @@ mod tests {
235
236
#[ test]
236
237
fn exported_function_names_works_for_wasmer_with_prefix ( ) {
237
238
let wasm = wat:: parse_str ( r#"(module)"# ) . unwrap ( ) ;
238
- let compiler = Cranelift :: default ( ) ;
239
+ let compiler = make_compiler_config ( ) ;
239
240
let store = Store :: new ( compiler) ;
240
241
let module = wasmer:: Module :: new ( & store, wasm) . unwrap ( ) ;
241
242
let exports = module. exported_function_names ( Some ( "b" ) ) ;
@@ -254,7 +255,7 @@ mod tests {
254
255
)"# ,
255
256
)
256
257
. unwrap ( ) ;
257
- let compiler = Cranelift :: default ( ) ;
258
+ let compiler = make_compiler_config ( ) ;
258
259
let store = Store :: new ( compiler) ;
259
260
let module = wasmer:: Module :: new ( & store, wasm) . unwrap ( ) ;
260
261
let exports = module. exported_function_names ( Some ( "b" ) ) ;
0 commit comments