diff --git a/compiler/tests/driver.rs b/compiler/tests/driver.rs index cd8172c..c7aeab1 100644 --- a/compiler/tests/driver.rs +++ b/compiler/tests/driver.rs @@ -100,11 +100,17 @@ fn test_execution_rs(fic: &str) { .current_dir(&work_dir) .env(ENV_RUST_BACKTRACE, "1") .status() - .expect("Failed to spawn and wait for the compiled binary"); + .unwrap_or_else(|e| { + panic!( + "Failed to spawn and wait for the compiled binary: {}, output available in: {}", + e.to_string(), + work_dir.display() + ) + }); assert!( execution_status.success(), - "Failed to execute {} with exit code: {}, output available in {}", + "Failed to execute {} with exit code: {}, output available in: {}", fic, execution_status.code().unwrap_or(-1), work_dir.display() diff --git a/samples/casting/dyn_star/basic.rs b/samples/casting/dyn_star/basic.rs index 749e47d..fba4951 100644 --- a/samples/casting/dyn_star/basic.rs +++ b/samples/casting/dyn_star/basic.rs @@ -12,8 +12,15 @@ impl Bar for Foo { } } +impl Bar for Box { + fn bar(&self) -> usize { + Bar::bar(self.as_ref()) + } +} + fn main() { let x = Foo(10); + let x = Box::new(x); let bar = x as dyn* Bar; foo(bar); } diff --git a/samples/casting/dyn_star/symbolic_inner.rs b/samples/casting/dyn_star/symbolic_inner.rs index f51846c..1e6eb7f 100644 --- a/samples/casting/dyn_star/symbolic_inner.rs +++ b/samples/casting/dyn_star/symbolic_inner.rs @@ -14,8 +14,15 @@ impl Bar for Foo { } } +impl Bar for Box { + fn bar(&self) -> usize { + Bar::bar(self.as_ref()) + } +} + fn main() { let x = Foo(10.mark_symbolic()); + let x = Box::new(x); let bar = x as dyn* Bar; test(bar); }