diceprop 0.3.0

Mathematical properties for random testing
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use std::fmt::Display;

use crate::Eval;

/// Asserts that `assertion` is true.
///
/// # Panics
///
/// Panics if `assertion` is false.
pub fn assert<L: Display + Copy>(assertion: Eval<L, bool>) {
    assert!(assertion.value, "assertion failed: {}", assertion.label);
}