layout tests: slot named once, invalid grow/shrink take their initial value; f12 at 1.5
This commit is contained in:
parent
83db53ec83
commit
3c8afd8129
1 changed files with 9 additions and 2 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in a new issue