Skip to main content

score_value

Function score_value 

Source
pub fn score_value(
    result_value: &Value,
    case: &GoldenCase,
) -> Option<CompareResult>
Expand description

Score a raw result value against a case’s expectation, dispatching on ResultKind so the fresh-run path (run_case) and the cache re-score path (cache::rescore) project the same way from the same stored shape: a Table value for ResultKind::Table, a verdict envelope for ResultKind::Verdict. Returns None when result_value doesn’t have the shape the case’s kind expects — the caller treats that as a hard fail, never a false pass.