Pretty/Power assertion macros for rust
An assert macro in the spirit of [Spock/Groovy assertions] (http://docs.groovy-lang.org/latest/html/documentation/core-testing-guide.html#powerassertions) which evaluates and prints subexpressions, simplifying failure analysis
```rust
extern crate passert;
fn it_works() { let a = 3; let b = 4; passert!(a + 2 + 3 == -b); } ```
Output
``` running 1 test Assertion failed: a + 2 + 3 == -b | | | | || 3 5 8 | |4 | -4 false thread 'it_works' panicked at 'Assertion failed: a + 2 + 3 == -b', src/lib.rs:11
```
Debug
.Debug
is done after the whole expression
has been evaluated. In cases where other subexpressions cause changes to previously
evaluated subexpression the displayed value may be incorrect.&&
and ||
are not evaluated lazily.