Files
improvise/crates/improvise-incremental/tests/random_formulas.rs
T
2026-10-10 15:55:34 -07:00

22 lines
816 B
Rust

//! `Incremental`'s formula cache against `Eager`'s over random formula and cell edits, read
//! at Region folded and no view. Evidence: `context/test-evidence/improvise-incremental.md`.
mod support;
use improvise_incremental::{Incremental, differential_in};
use proptest::prelude::*;
use support::{any_formula_edit, formula_workbook};
proptest! {
#[test]
fn the_formula_fixture_matches_eager_over_random_formula_and_cell_edits(
edits in prop::collection::vec(any_formula_edit(), 0..4),
) {
let wb = formula_workbook();
let none = vec!["Region".to_string()];
let candidate = Incremental::new(wb.model.clone(), none.clone());
let ran = differential_in(&wb.model, &[], &none, candidate, &edits);
prop_assert!(ran.is_ok(), "{}", ran.unwrap_err());
}
}