Skip to content

Commit

Permalink
DO NOT MERGE TO MASTER.
Browse files Browse the repository at this point in the history
Remove parts of this test not relevant to the failure.
  • Loading branch information
nlewycky committed Oct 12, 2020
1 parent d696171 commit e6801dd
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions lib/deprecated/runtime/examples/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@ static WAT: &'static str = r#"
(module
(type (;0;) (func (result i32)))
(import "env" "do_panic" (func $do_panic (type 0)))
(func $dbz (result i32)
call $do_panic
drop
i32.const 42
i32.const 0
i32.div_u
)
(export "dbz" (func $dbz))
)
"#;

Expand Down Expand Up @@ -43,16 +35,13 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {

println!("instantiating");

let instance = module.instantiate(&imports! {
let imports = imports! {
"env" => {
"do_panic" => Func::new(do_panic),
},
})?;
};

let foo: Func<(), i32> = instance.exports.get("dbz")?;
let result = foo.call();

println!("result: {:?}", result.unwrap_err().message());
let instance = module.instantiate(&imports)?;

Ok(())
}
Expand Down

0 comments on commit e6801dd

Please sign in to comment.