⎇ dff7bef4e12d1cb436e7e50839242170379bd998
tests/generated/border_no_child.rs
History
Who touched what
raw
Rename Rect field start->left end->right (#257)
1#[test]
2fn border_no_child() {
3 let mut taffy = taffy::Taffy::new();
4 let node = taffy
5 .new_with_children(
6 taffy::style::Style {
7 border: taffy::geometry::Rect {
8 left: taffy::style::Dimension::Points(10f32),
9 right: taffy::style::Dimension::Points(10f32),
10 top: taffy::style::Dimension::Points(10f32),
11 bottom: taffy::style::Dimension::Points(10f32),
12 ..Default::default()
13 },
14 ..Default::default()
15 },
16 &[],
17 )
18 .unwrap();
19 taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
20 assert_eq!(taffy.layout(node).unwrap().size.width, 20f32);
21 assert_eq!(taffy.layout(node).unwrap().size.height, 20f32);
22 assert_eq!(taffy.layout(node).unwrap().location.x, 0f32);
23 assert_eq!(taffy.layout(node).unwrap().location.y, 0f32);
24}