Skip to content

Commit

Permalink
fix: format code
Browse files Browse the repository at this point in the history
  • Loading branch information
nfejzic committed Sep 9, 2023
1 parent cf632a6 commit 2176dcf
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions core/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@ mod snapshot;

macro_rules! test_fn {
($fn: path) => {{
let try_run =
::std::panic::catch_unwind($fn)
.map_err(|err| {
let panic_msg = err
.downcast_ref::<&str>()
.unwrap_or(&"Panic message not available");

format!("Test case panicked: {}", panic_msg).into()
});
let try_run = ::std::panic::catch_unwind($fn).map_err(|err| {
let panic_msg = err
.downcast_ref::<&str>()
.unwrap_or(&"Panic message not available");

format!("Test case panicked: {}", panic_msg).into()
});

libtest_mimic::Trial::test(stringify!($fn), || try_run)
}};
Expand Down

0 comments on commit 2176dcf

Please sign in to comment.