@@ -21,15 +21,14 @@ use crate::WasmExecutionMethod;
2121
2222use codec:: Encode ;
2323use test_case:: test_case;
24- use wabt;
2524
2625#[ test_case( WasmExecutionMethod :: Interpreted ) ]
2726#[ cfg_attr( feature = "wasmtime" , test_case( WasmExecutionMethod :: Compiled ) ) ]
2827fn sandbox_should_work ( wasm_method : WasmExecutionMethod ) {
2928 let mut ext = TestExternalities :: default ( ) ;
3029 let mut ext = ext. ext ( ) ;
3130
32- let code = wabt :: wat2wasm ( r#"
31+ let code = wat :: parse_str ( r#"
3332 (module
3433 (import "env" "assert" (func $assert (param i32)))
3534 (import "env" "inc_counter" (func $inc_counter (param i32) (result i32)))
@@ -67,7 +66,7 @@ fn sandbox_trap(wasm_method: WasmExecutionMethod) {
6766 let mut ext = TestExternalities :: default ( ) ;
6867 let mut ext = ext. ext ( ) ;
6968
70- let code = wabt :: wat2wasm ( r#"
69+ let code = wat :: parse_str ( r#"
7170 (module
7271 (import "env" "assert" (func $assert (param i32)))
7372 (func (export "call")
@@ -94,7 +93,7 @@ fn start_called(wasm_method: WasmExecutionMethod) {
9493 let mut ext = TestExternalities :: default ( ) ;
9594 let mut ext = ext. ext ( ) ;
9695
97- let code = wabt :: wat2wasm ( r#"
96+ let code = wat :: parse_str ( r#"
9897 (module
9998 (import "env" "assert" (func $assert (param i32)))
10099 (import "env" "inc_counter" (func $inc_counter (param i32) (result i32)))
@@ -138,7 +137,7 @@ fn invoke_args(wasm_method: WasmExecutionMethod) {
138137 let mut ext = TestExternalities :: default ( ) ;
139138 let mut ext = ext. ext ( ) ;
140139
141- let code = wabt :: wat2wasm ( r#"
140+ let code = wat :: parse_str ( r#"
142141 (module
143142 (import "env" "assert" (func $assert (param i32)))
144143
@@ -178,7 +177,7 @@ fn return_val(wasm_method: WasmExecutionMethod) {
178177 let mut ext = TestExternalities :: default ( ) ;
179178 let mut ext = ext. ext ( ) ;
180179
181- let code = wabt :: wat2wasm ( r#"
180+ let code = wat :: parse_str ( r#"
182181 (module
183182 (func (export "call") (param $x i32) (result i32)
184183 (i32.add
@@ -206,7 +205,7 @@ fn unlinkable_module(wasm_method: WasmExecutionMethod) {
206205 let mut ext = TestExternalities :: default ( ) ;
207206 let mut ext = ext. ext ( ) ;
208207
209- let code = wabt :: wat2wasm ( r#"
208+ let code = wat :: parse_str ( r#"
210209 (module
211210 (import "env" "non-existent" (func))
212211
@@ -252,7 +251,7 @@ fn start_fn_ok(wasm_method: WasmExecutionMethod) {
252251 let mut ext = TestExternalities :: default ( ) ;
253252 let mut ext = ext. ext ( ) ;
254253
255- let code = wabt :: wat2wasm ( r#"
254+ let code = wat :: parse_str ( r#"
256255 (module
257256 (func (export "call")
258257 )
@@ -281,7 +280,7 @@ fn start_fn_traps(wasm_method: WasmExecutionMethod) {
281280 let mut ext = TestExternalities :: default ( ) ;
282281 let mut ext = ext. ext ( ) ;
283282
284- let code = wabt :: wat2wasm ( r#"
283+ let code = wat :: parse_str ( r#"
285284 (module
286285 (func (export "call")
287286 )
@@ -311,7 +310,7 @@ fn get_global_val_works(wasm_method: WasmExecutionMethod) {
311310 let mut ext = TestExternalities :: default ( ) ;
312311 let mut ext = ext. ext ( ) ;
313312
314- let code = wabt :: wat2wasm ( r#"
313+ let code = wat :: parse_str ( r#"
315314 (module
316315 (global (export "test_global") i64 (i64.const 500))
317316 )
0 commit comments