Skip to main content

assertion_numeric

Function assertion_numeric 

Source
pub fn assertion_numeric(
    kind: AssertKind,
    cmp: AssertCmp,
    maximize: bool,
    left: i64,
    right: i64,
    msg: &str,
)
Expand description

Numeric guidance assertion backing function.

Evaluates a comparison (left cmp right), tracks pass/fail counts, and maintains a watermark of the best observed value of left. For NumericSometimes, signals a discovery when the watermark improves past the last fork watermark.

maximize determines whether improving means getting larger (true) or smaller (false).

This is a no-op if the assertion table is not initialized.