Expose TrapCode::Interrupt on epoch based interruption (#4105)

This commit is contained in:
Saúl Cabrera
2022-05-10 11:27:30 -04:00
committed by GitHub
parent 71fc16bbeb
commit 52524d258c
5 changed files with 16 additions and 20 deletions

View File

@@ -29,7 +29,7 @@ fn main() -> Result<()> {
let trap = run.call(&mut store, ()).unwrap_err();
println!("trap received...");
assert!(trap.to_string().contains("epoch deadline reached"));
assert!(trap.trap_code().unwrap() == TrapCode::Interrupt);
Ok(())
}