always_assert

Macro always_assert 

Source
macro_rules! always_assert {
    ($name:ident, $condition:expr, $message:expr) => { ... };
}
Expand description

Assert that a condition is always true, panicking on failure.

This macro is used for conditions that must always hold in a correct distributed system implementation. If the condition fails, the simulation will panic immediately with a descriptive error message including the current seed.

ยงParameters

  • name - An identifier for this assertion (for error reporting)
  • condition - The expression to evaluate (must be boolean)
  • message - A descriptive error message to show on failure

Assert that a condition must always be true. Panics immediately if false.