Skip to main content

assert_panics_with

Function assert_panics_with 

Source
pub fn assert_panics_with<F: FnOnce() + UnwindSafe>(expected_msg: &str, f: F)
Expand description

Assert that a closure panics with a specific message

ยงExample

use windjammer_runtime::test::assert_panics_with;

assert_panics_with("error", || {
    panic!("error");
});