macro_rules! assert_with_context {
($ctx:expr, $cond:expr, $msg:expr) => { ... };
($ctx:expr, $cond:expr, $msg:expr, $($key:ident = $value:expr),+ $(,)?) => { ... };
}Expand description
Assert a condition and, on failure, emit a structured dump with full context.
ⓘ
let ctx = TestContext::new("my_test", 42).with_subsystem("scheduler");
assert_with_context!(ctx, task_count > 0, "expected at least one task");