⎇ 06471455e8cc93ab7ffee650a033ae7df8943611
tests/generated/flex_basis_unconstraint_row.rs
Ñawpa willay
Pi imata llamkarqan
ch'uya
1#[test]
2fn flex_basis_unconstraint_row() {
3 let mut stretch = stretch2::Stretch::new();
4 let node0 = stretch
5 .new_node(
6 stretch2::style::Style {
7 flex_basis: stretch2::style::Dimension::Points(50f32),
8 size: stretch2::geometry::Size {
9 height: stretch2::style::Dimension::Points(100f32),
10 ..Default::default()
11 },
12 ..Default::default()
13 },
14 &[],
15 )
16 .unwrap();
17 let node = stretch.new_node(stretch2::style::Style { ..Default::default() }, &[node0]).unwrap();
18 stretch.compute_layout(node, stretch2::geometry::Size::undefined()).unwrap();
19 assert_eq!(stretch.layout(node).unwrap().size.width, 0f32);
20 assert_eq!(stretch.layout(node).unwrap().size.height, 100f32);
21 assert_eq!(stretch.layout(node).unwrap().location.x, 0f32);
22 assert_eq!(stretch.layout(node).unwrap().location.y, 0f32);
23 assert_eq!(stretch.layout(node0).unwrap().size.width, 0f32);
24 assert_eq!(stretch.layout(node0).unwrap().size.height, 100f32);
25 assert_eq!(stretch.layout(node0).unwrap().location.x, 0f32);
26 assert_eq!(stretch.layout(node0).unwrap().location.y, 0f32);
27}