Fix expected trap messages.

This commit is contained in:
Dan Gohman
2020-01-09 13:26:29 -08:00
parent f83eafd6c2
commit 037c9d652b

View File

@@ -104,7 +104,7 @@ mod tests {
println!("calling read_out_of_bounds..."); println!("calling read_out_of_bounds...");
let trap = invoke_export(&instance, &data, "read_out_of_bounds").unwrap_err(); let trap = invoke_export(&instance, &data, "read_out_of_bounds").unwrap_err();
assert!(trap.root_cause().to_string().starts_with( assert!(trap.root_cause().to_string().starts_with(
"trapped: Ref(Trap { message: \"wasm trap: out of bounds memory access" "trapped: Trap { message: \"call error: wasm trap: out of bounds memory access"
)); ));
} }
@@ -129,7 +129,7 @@ mod tests {
let trap = read_out_of_bounds_func.borrow().call(&[]).unwrap_err(); let trap = read_out_of_bounds_func.borrow().call(&[]).unwrap_err();
assert!(trap assert!(trap
.message() .message()
.starts_with("wasm trap: out of bounds memory access")); .starts_with("call error: wasm trap: out of bounds memory access"));
} }
} }