claim_present

Macro claim_present 

Source
macro_rules! claim_present {
    ($verdict:expr, $value:expr) => { ... };
}
Expand description

Presence-checked sibling of claim! for a possibly-absent metric.

Expands to Verdict::claim_present with a stringify!-derived label (the same &'static str discipline as claim!). The argument is an Option-valued expression (e.g. a phase_metric lookup); a None records a LOUD Fail (<expr>: metric absent), a Some(v) behaves exactly like claim!.

let mut v = Verdict::new();
let throughput: Option<f64> = Some(1500.0);
claim_present!(v, throughput).at_least(1000.0);
let missing: Option<f64> = None;
claim_present!(v, missing).at_least(1.0); // records a Fail, not a panic
let r = v.into_result();
assert!(!r.is_pass()); // the absent metric failed the verdict