macro_rules! expect { ($actual:expr) => { ... }; }
Expand description
Make an assertion.
This macro accepts an expression and returns an Assertion
, which allows you to make
assertions on that value.
Under the hood, this macro calls Assertion::new
using DefaultAssertionFormat
. If you
want to use a custom AssertionFormat
instead, you can call that method directly or write
your own macro that calls it.
Examples
use xpct::{expect, equal};
expect!("disco").to(equal("disco"));