⎇ a9acf58cd4179aba3230ea7abd27003dc445c034
tests/generated/absolute_layout_in_wrap_reverse_column_container.rs
History
Who touched what
raw
[gentest] Refactor gentest to use WebDriver & quote crate.
1#[test]
2fn absolute_layout_in_wrap_reverse_column_container() {
3 let layout = stretch::compute(
4 &stretch::style::Node {
5 flex_direction: stretch::style::FlexDirection::Column,
6 flex_wrap: stretch::style::FlexWrap::WrapReverse,
7 size: stretch::geometry::Size {
8 width: stretch::style::Dimension::Points(100f32),
9 height: stretch::style::Dimension::Points(100f32),
10 ..Default::default()
11 },
12 children: vec![stretch::style::Node {
13 position_type: stretch::style::PositionType::Absolute,
14 size: stretch::geometry::Size {
15 width: stretch::style::Dimension::Points(20f32),
16 height: stretch::style::Dimension::Points(20f32),
17 ..Default::default()
18 },
19 ..Default::default()
20 }],
21 ..Default::default()
22 },
23 stretch::geometry::Size::undefined(),
24 )
25 .unwrap();
26 assert_eq!(layout.size.width, 100f32);
27 assert_eq!(layout.size.height, 100f32);
28 assert_eq!(layout.location.x, 0f32);
29 assert_eq!(layout.location.y, 0f32);
30 assert_eq!(layout.children[0usize].size.width, 20f32);
31 assert_eq!(layout.children[0usize].size.height, 20f32);
32 assert_eq!(layout.children[0usize].location.x, 80f32);
33 assert_eq!(layout.children[0usize].location.y, 0f32);
34}