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_eq2!(i8::abs, a, i8::abs, b);

Modules§

  • Assert a function output is equal to an expression.
  • Assert a function output is equal to another function output.
  • Assert a function output is greater than or equal to an expression.
  • Assert a function output is greater than or equal to another.
  • Assert a function output is greater than an expression.
  • Assert a function output is greater than another.
  • Assert a function output is less than or equal to an expression.
  • Assert a function output is less than or equal to another.
  • Assert a function output is less than an expression.
  • Assert a function output is less than another.
  • Assert a function output is not equal to an expression.
  • Assert a function output is not equal to another.