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);