Coalesce resize layout diagnostics

This commit is contained in:
iris-ai committed 2026-09-14 17:05:11 -04:00
1 parent 480f0bc99f
commit 82fa6c1123
7 files changed
+316 -28

No files matched your search

+18
View File
@@ -227,6 +227,24 @@ fn a_resize_redraws_what_read_the_output() {
assert_eq!(draws.get(), settled + 1);
}
#[test]
fn reporting_the_same_output_size_does_not_start_a_resize() {
let mut h = Harness::new((400, 200));
let draws = Rc::new(Cell::new(0));
let leaf = ReadsOutput {
draws: draws.clone(),
}
.add(&mut h.rsc);
h.set_root(leaf);
let settled = draws.get();
h.resize((400, 200));
assert!(!h.needs_redraw());
h.frame();
assert_eq!(draws.get(), settled);
}
#[test]
fn narrowing_the_output_reflows_text_and_relays_out_around_it() {
let mut h = Harness::new((600, 400));