Macro ::std::test::assert!(..)

Overview

Assert that the expression provided as an argument is true, or cause a vm panic.

The second argument can optionally be used to format a panic message.

This is useful when writing test cases.

Examples

let value = 42;

assert!(value == 42, "Value was not what was expected, instead it was {}", value);