diff --git a/crates/thing-core/tests/layout.rs b/crates/thing-core/tests/layout.rs index a09e366..74f9c8e 100644 --- a/crates/thing-core/tests/layout.rs +++ b/crates/thing-core/tests/layout.rs @@ -110,6 +110,7 @@ fn goldens() { check(Fixture::F01SwarmDashboard, "-scale2", &pixels(800.0, 600.0, 2.0)); check(Fixture::F01SwarmDashboard, "-scale1.5", &pixels(800.0, 600.0, 1.5)); check(Fixture::F08EmbedViewport, "-scale1.5", &pixels(800.0, 600.0, 1.5)); + check(Fixture::F12TextEdge, "-scale1.5", &pixels(800.0, 600.0, 1.5)); check(Fixture::F01SwarmDashboard, "-cells", &cells(100.0, 37.0)); } @@ -345,8 +346,14 @@ fn arm_table() { one(&padding, "padding"); assert_eq!(padding.nodes, initial(&|s| s.padding.top = px(0.0))); one(&probe(&|s| s.gap.width = px(-1.0)), "gap"); - one(&probe(&|s| s.grow = f64::NAN), "grow"); - one(&probe(&|s| s.shrink = -1.0), "shrink"); + let grow = probe(&|s| s.grow = f64::NAN); + one(&grow, "grow"); + assert_eq!(grow.nodes, initial(&|s| s.grow = 0.0)); + let shrink = probe(&|s| s.shrink = -1.0); + one(&shrink, "shrink"); + assert_eq!(shrink.nodes, initial(&|s| s.shrink = 1.0)); + // A slot is named once however many of its parts are wrong. + one(&probe(&|s| s.gap = size2(px(-1.0), px(-2.0))), "gap"); let wide = probe(&|s| s.size.width = px(1e40)); one(&wide, "size"); assert_eq!(wide.nodes, initial(&|s| s.size.width = Dimension::Auto));