⎇ ac3349ce0fd60591d6019a4658dfe84912514e62
tests/generated/absolute_layout_in_wrap_reverse_column_container.rs
Historia
Quién tocó qué
crudo
[gentest] Split generated tests into separate files.
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(100.0000),
9 height: stretch::style::Dimension::Points(100.0000),
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(20.0000),
16 height: stretch::style::Dimension::Points(20.0000),
17 ..Default::default()
18 },
19 ..Default::default()
20 }],
21 ..Default::default()
22 },
23 stretch::geometry::Size::undefined(),
24 )
25 .unwrap();
26
27 assert_eq!(layout.size.width, 100.0000);
28 assert_eq!(layout.size.height, 100.0000);
29 assert_eq!(layout.location.x, 0.0000);
30 assert_eq!(layout.location.y, 0.0000);
31
32 assert_eq!(layout.children[0].size.width, 20.0000);
33 assert_eq!(layout.children[0].size.height, 20.0000);
34 assert_eq!(layout.children[0].location.x, 80.0000);
35 assert_eq!(layout.children[0].location.y, 0.0000);
36}