⎇ 54e00d63d6d4a99e89ac0934a6bb61e415ab1006
tests/generated/padding_no_child.rs
Ñawpa willay
Pi imata llamkarqan
ch'uya
update tests and benchmarks to use new api
1#[test]
2fn padding_no_child() {
3 let layout = stretch::node::Node::new(
4 stretch::style::Style {
5 padding: stretch::geometry::Rect {
6 start: stretch::style::Dimension::Points(10f32),
7 end: stretch::style::Dimension::Points(10f32),
8 top: stretch::style::Dimension::Points(10f32),
9 bottom: stretch::style::Dimension::Points(10f32),
10 ..Default::default()
11 },
12 ..Default::default()
13 },
14 vec![],
15 )
16 .compute_layout(stretch::geometry::Size::undefined())
17 .unwrap();
18 assert_eq!(layout.size.width, 20f32);
19 assert_eq!(layout.size.height, 20f32);
20 assert_eq!(layout.location.x, 0f32);
21 assert_eq!(layout.location.y, 0f32);
22}