⎇ b952c2b38dc58e87f43dc263e17beb4174bc68e2
benches/generated/min_height_overrides_max_height.rs
Ñawpa willay
Pi imata llamkarqan
ch'uya
Min values should override max values (#262)
1pub fn compute() {
2 let mut taffy = taffy::Taffy::new();
3 let node0 = taffy
4 .new_with_children(
5 taffy::style::Style {
6 min_size: taffy::geometry::Size {
7 height: taffy::style::Dimension::Points(100f32),
8 ..Default::default()
9 },
10 max_size: taffy::geometry::Size {
11 height: taffy::style::Dimension::Points(50f32),
12 ..Default::default()
13 },
14 ..Default::default()
15 },
16 &[],
17 )
18 .unwrap();
19 let node = taffy.new_with_children(taffy::style::Style { ..Default::default() }, &[node0]).unwrap();
20 taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
21}