Function wgpu_test::fail_if

source ·
pub fn fail_if<T>(
    device: &Device,
    should_fail: bool,
    callback: impl FnOnce() -> T,
    expected_msg_substring: Option<&'static str>
) -> T
Expand description

Run some code in an error scope and assert that validation succeeds or fails depending on the provided should_fail boolean.