From bf62d83017ba5d0395bf8ccdc53dbf526812f275 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 28 Nov 2026 05:13:54 +0100 Subject: [PATCH] layout tests: wrap text with words --- crates/thing-core/tests/layout.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/thing-core/tests/layout.rs b/crates/thing-core/tests/layout.rs index 4c4ff80..57d652d 100644 --- a/crates/thing-core/tests/layout.rs +++ b/crates/thing-core/tests/layout.rs @@ -476,7 +476,7 @@ fn item_alignment_and_content_arms() { fn available_space_is_logical() { // A shrink-to-fit box wraps its text at the room it is offered: 100 logical px at any scale. let wrapped = BoxStyle { size: size2(Dimension::Content, Dimension::Auto), ..plain() }; - let root = bx("root", sized(100.0, 600.0), vec![bx("wrap", wrapped, vec![text("t", &"x".repeat(40))])]); + let root = bx("root", sized(100.0, 600.0), vec![bx("wrap", wrapped, vec![text("t", &"xxxx ".repeat(10))])]); for scale in [1.0, 2.0] { let laid = lay_with(&mut MemState::new(), root.clone(), &pixels(800.0, 600.0, scale)); assert_eq!(rect(&laid, "wrap").2, 100.0 * scale);