assertables

Module assert_fn

source
Expand description

Assert for comparing functions.

These macros help compare functions that return anything. The macros call the functions, then compare the return values.

Compare a function with another function:

Compare a function with an expression:

§Example

use assertables::*;

let a: i8 = -1;
let b: i8 = 1;
assert_fn_eq!(i8::abs, a, i8::abs, b);

Modules§