⎇ bce89b1006f36ce35abfaf1f1c2b3dd95f3dffd3
tests/generated/flex_basis_unconstraint_row.rs
Ñawpa willay
Pi imata llamkarqan
ch'uya
index: update tests to API changes
1#[test]
2fn flex_basis_unconstraint_row() {
3 let mut stretch = stretch::Stretch::new();
4 let node0 = stretch
5 .new_node(
6 stretch::style::Style {
7 flex_basis: stretch::style::Dimension::Points(50f32),
8 size: stretch::geometry::Size {
9 height: stretch::style::Dimension::Points(100f32),
10 ..Default::default()
11 },
12 ..Default::default()
13 },
14 vec![],
15 )
16 .unwrap();
17 let node = stretch.new_node(stretch::style::Style { ..Default::default() }, vec![node0]).unwrap();
18 stretch.compute_layout(node, stretch::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}