test(incremental): hidden members under every aggregation, evidence and the step 4 reasoning (improvise-u2le)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdfEGXA7aJ6ftMsCc9PJze
This commit is contained in:
committed by
Edward Langley
parent
a18a092186
commit
c6fbce0ca1
@@ -181,3 +181,18 @@ fn occupancy_with_a_hidden_item_reads_the_groups_it_subtracts() {
|
||||
"the line, less p3 under it"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_group_whose_cells_are_all_cleared_is_no_longer_read() {
|
||||
let mut backend = Incremental::new(table(2, AggFunc::Count), vec![]);
|
||||
let one = cell(1, 1, 1);
|
||||
assert_eq!(backend.raw_fold(&one), Some(CellValue::Number(1.0)));
|
||||
backend.apply(&Edit::ClearCell(cell(1, 1, 1)));
|
||||
let before = backend.meter();
|
||||
assert_eq!(backend.raw_fold(&one), None, "nothing is left under it");
|
||||
assert_eq!(
|
||||
since(before, backend.meter()).reads,
|
||||
0,
|
||||
"and no empty group stands in for it"
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user