From 283e0d584c0b78185ea08738ca0f5740fb857a8f Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 28 Nov 2026 09:14:31 +0100 Subject: [PATCH] frame test: out of range by two slabs --- crates/thing-core/tests/frame.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/crates/thing-core/tests/frame.rs b/crates/thing-core/tests/frame.rs index 93d4c49..5fa81a3 100644 --- a/crates/thing-core/tests/frame.rs +++ b/crates/thing-core/tests/frame.rs @@ -248,9 +248,17 @@ fn no_room_draws_nothing_without_a_diagnostic_and_the_next_frame_draws_again() { #[test] fn a_layout_past_the_precision_bound_keeps_the_last_good_frame() { let good = say(1, "fits"); - let mut wide = say(2, "does not fit"); + // Two boxes side by side that together reach past the bound: neither alone is refused. + let slab = |id: &str| match boxed(id, vec![]) { + Node::Box(mut slab) => { + slab.style.size = size2(px(1_500_000.0), px(10.0)); + Node::Box(slab) + } + other => other, + }; + let mut wide = inline(2, boxed("root", vec![slab("left"), slab("right")])); if let Node::Box(root) = &mut wide.root { - root.style.size = size2(px(3_000_000.0), px(10.0)); + root.style.direction = Direction::Row; } let mut state = MemState::new(); state.put(&good.provider_id, &good);