Skip to content

Commit

Permalink
Always print binary result of test vm
Browse files Browse the repository at this point in the history
  • Loading branch information
yanganto committed Nov 23, 2021
1 parent d9ebabe commit a802f98
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions sewup-derive/src/lib.rs
Expand Up @@ -1168,16 +1168,14 @@ pub fn ewasm_test(attr: TokenStream, item: TokenStream) -> TokenStream {
}
if let Ok(output_msg) = std::str::from_utf8(&r.output_data) {
eprintln!("vm msg : {}", output_msg);
} else {
eprintln!("vm output : {:?}", r.output_data);
eprintln!("vm msg : \"{}\"", output_msg);
}
eprintln!("vm output : {:?}", r.output_data);
if let Ok(expect_msg) = std::str::from_utf8(&expect_output) {
eprintln!("expected : {}", expect_msg);
} else {
eprintln!("expected : {:?}", expect_output);
eprintln!("expected : \"{}\"", expect_msg);
}
eprintln!("expected : {:?}", expect_output);
panic!("function `{}` output is unexpected", fn_name);
}
},
Expand Down

0 comments on commit a802f98

Please sign in to comment.