layout tests: a clamped measure stays within the bound

This commit is contained in:
Meta Vens 2026-11-28 05:44:00 +01:00
commit 1ccbb91192

View file

@ -735,6 +735,7 @@ fn extreme_values_never_panic() {
let tree = bind(&mut MemState::new(), &surface_of(bx("root", plain(), vec![text("t", "x"), text("u", "y")]))).unwrap();
let laid = layout(&tree, &pixels(800.0, 600.0, 1.0), &mut Huge).unwrap();
assert_eq!(laid.nodes.len(), 3);
assert!(laid.nodes.iter().all(|n| n.rect.w <= 1e7 && n.rect.h <= 1e7), "{laid:?}");
}
#[test]