Skip to main content

assert_execution_error

Macro assert_execution_error 

Source
macro_rules! assert_execution_error {
    ($execution_result:expr, matches $pat:pat $(if $guard:expr)? $(,)?) => { ... };
    ($execution_result:expr, $expected:expr $(,)?) => { ... };
}
Expand description

Asserts that a Result<_, ExecError> failed as expected.

Two forms:

  • ..., matches <pat> [if <guard>] — matches the inner ExecutionError against <pat>. Use this for variants other than FailedAssertion, or to assert on a specific err_code.
  • ..., $expected — delegates to MasmError::matches_execution_error (e.g. a MasmError error code).