tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

HTML 5364Rust 86Markdown 12TOML 91822 Sutichaykuna

⎇ float-layout tests/generated/flex/android_news_feed.rs Rust · 624 siq'ikuna · 32.8 KB Ñawpa willay Pi imata llamkarqan ch'uya

Use tagged pointer to represent size/length values (#769) afa6437b0 · Nico Burns ·

1#[test]
2#[allow(non_snake_case)]
3fn android_news_feed__border_box() {
4    #[allow(unused_imports)]
5    use taffy::{prelude::*, Layout};
6    let mut taffy = crate::new_test_tree();
7    let node000000 = taffy
8        .new_leaf(taffy::style::Style {
9            align_content: Some(taffy::style::AlignContent::Stretch),
10            flex_shrink: 0f32,
11            size: taffy::geometry::Size {
12                width: taffy::style::Dimension::from_length(120f32),
13                height: taffy::style::Dimension::from_length(120f32),
14            },
15            ..Default::default()
16        })
17        .unwrap();
18    let node00000 = taffy
19        .new_with_children(
20            taffy::style::Style {
21                align_content: Some(taffy::style::AlignContent::Stretch),
22                flex_shrink: 0f32,
23                ..Default::default()
24            },
25            &[node000000],
26        )
27        .unwrap();
28    let node000010 = taffy
29        .new_leaf(taffy::style::Style {
30            align_content: Some(taffy::style::AlignContent::Stretch),
31            flex_shrink: 1f32,
32            ..Default::default()
33        })
34        .unwrap();
35    let node000011 = taffy
36        .new_leaf(taffy::style::Style {
37            align_content: Some(taffy::style::AlignContent::Stretch),
38            flex_shrink: 1f32,
39            ..Default::default()
40        })
41        .unwrap();
42    let node00001 = taffy
43        .new_with_children(
44            taffy::style::Style {
45                flex_direction: taffy::style::FlexDirection::Column,
46                align_content: Some(taffy::style::AlignContent::Stretch),
47                flex_shrink: 1f32,
48                margin: taffy::geometry::Rect { left: zero(), right: length(36f32), top: zero(), bottom: zero() },
49                padding: taffy::geometry::Rect {
50                    left: length(36f32),
51                    right: length(36f32),
52                    top: length(21f32),
53                    bottom: length(18f32),
54                },
55                ..Default::default()
56            },
57            &[node000010, node000011],
58        )
59        .unwrap();
60    let node0000 = taffy
61        .new_with_children(
62            taffy::style::Style {
63                align_items: Some(taffy::style::AlignItems::FlexStart),
64                align_content: Some(taffy::style::AlignContent::Stretch),
65                margin: taffy::geometry::Rect {
66                    left: length(36f32),
67                    right: zero(),
68                    top: length(24f32),
69                    bottom: zero(),
70                },
71                ..Default::default()
72            },
73            &[node00000, node00001],
74        )
75        .unwrap();
76    let node000 = taffy
77        .new_with_children(
78            taffy::style::Style {
79                flex_direction: taffy::style::FlexDirection::Column,
80                align_content: Some(taffy::style::AlignContent::Stretch),
81                ..Default::default()
82            },
83            &[node0000],
84        )
85        .unwrap();
86    let node001000 = taffy
87        .new_leaf(taffy::style::Style {
88            align_content: Some(taffy::style::AlignContent::Stretch),
89            flex_shrink: 0f32,
90            size: taffy::geometry::Size {
91                width: taffy::style::Dimension::from_length(72f32),
92                height: taffy::style::Dimension::from_length(72f32),
93            },
94            ..Default::default()
95        })
96        .unwrap();
97    let node00100 = taffy
98        .new_with_children(
99            taffy::style::Style {
100                align_content: Some(taffy::style::AlignContent::Stretch),
101                flex_shrink: 0f32,
102                ..Default::default()
103            },
104            &[node001000],
105        )
106        .unwrap();
107    let node001010 = taffy
108        .new_leaf(taffy::style::Style {
109            align_content: Some(taffy::style::AlignContent::Stretch),
110            flex_shrink: 1f32,
111            ..Default::default()
112        })
113        .unwrap();
114    let node001011 = taffy
115        .new_leaf(taffy::style::Style {
116            align_content: Some(taffy::style::AlignContent::Stretch),
117            flex_shrink: 1f32,
118            ..Default::default()
119        })
120        .unwrap();
121    let node00101 = taffy
122        .new_with_children(
123            taffy::style::Style {
124                flex_direction: taffy::style::FlexDirection::Column,
125                align_content: Some(taffy::style::AlignContent::Stretch),
126                flex_shrink: 1f32,
127                margin: taffy::geometry::Rect { left: zero(), right: length(36f32), top: zero(), bottom: zero() },
128                padding: taffy::geometry::Rect {
129                    left: length(36f32),
130                    right: length(36f32),
131                    top: length(21f32),
132                    bottom: length(18f32),
133                },
134                ..Default::default()
135            },
136            &[node001010, node001011],
137        )
138        .unwrap();
139    let node0010 = taffy
140        .new_with_children(
141            taffy::style::Style {
142                align_items: Some(taffy::style::AlignItems::FlexStart),
143                align_content: Some(taffy::style::AlignContent::Stretch),
144                margin: taffy::geometry::Rect {
145                    left: length(174f32),
146                    right: zero(),
147                    top: length(24f32),
148                    bottom: zero(),
149                },
150                ..Default::default()
151            },
152            &[node00100, node00101],
153        )
154        .unwrap();
155    let node001 = taffy
156        .new_with_children(
157            taffy::style::Style {
158                flex_direction: taffy::style::FlexDirection::Column,
159                align_content: Some(taffy::style::AlignContent::Stretch),
160                ..Default::default()
161            },
162            &[node0010],
163        )
164        .unwrap();
165    let node00 = taffy
166        .new_with_children(
167            taffy::style::Style {
168                flex_direction: taffy::style::FlexDirection::Column,
169                align_content: Some(taffy::style::AlignContent::Stretch),
170                ..Default::default()
171            },
172            &[node000, node001],
173        )
174        .unwrap();
175    let node0 = taffy
176        .new_with_children(
177            taffy::style::Style {
178                flex_direction: taffy::style::FlexDirection::Column,
179                flex_shrink: 0f32,
180                ..Default::default()
181            },
182            &[node00],
183        )
184        .unwrap();
185    let node = taffy
186        .new_with_children(
187            taffy::style::Style {
188                flex_direction: taffy::style::FlexDirection::Column,
189                align_content: Some(taffy::style::AlignContent::Stretch),
190                flex_shrink: 0f32,
191                size: taffy::geometry::Size { width: taffy::style::Dimension::from_length(1080f32), height: auto() },
192                ..Default::default()
193            },
194            &[node0],
195        )
196        .unwrap();
197    taffy.compute_layout_with_measure(node, taffy::geometry::Size::MAX_CONTENT, crate::test_measure_function).unwrap();
198    println!("\nComputed tree:");
199    taffy.print_tree(node);
200    println!();
201    let layout = taffy.layout(node).unwrap();
202    let Layout { size, location, .. } = layout;
203    assert_eq!(size.width, 1080f32, "width of node {:?}. Expected {}. Actual {}", node, 1080f32, size.width);
204    assert_eq!(size.height, 240f32, "height of node {:?}. Expected {}. Actual {}", node, 240f32, size.height);
205    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
206    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
207    let layout = taffy.layout(node0).unwrap();
208    let Layout { size, location, .. } = layout;
209    assert_eq!(size.width, 1080f32, "width of node {:?}. Expected {}. Actual {}", node0, 1080f32, size.width);
210    assert_eq!(size.height, 240f32, "height of node {:?}. Expected {}. Actual {}", node0, 240f32, size.height);
211    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node0, 0f32, location.x);
212    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node0, 0f32, location.y);
213    let layout = taffy.layout(node00).unwrap();
214    let Layout { size, location, .. } = layout;
215    assert_eq!(size.width, 1080f32, "width of node {:?}. Expected {}. Actual {}", node00, 1080f32, size.width);
216    assert_eq!(size.height, 240f32, "height of node {:?}. Expected {}. Actual {}", node00, 240f32, size.height);
217    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node00, 0f32, location.x);
218    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00, 0f32, location.y);
219    let layout = taffy.layout(node000).unwrap();
220    let Layout { size, location, .. } = layout;
221    assert_eq!(size.width, 1080f32, "width of node {:?}. Expected {}. Actual {}", node000, 1080f32, size.width);
222    assert_eq!(size.height, 144f32, "height of node {:?}. Expected {}. Actual {}", node000, 144f32, size.height);
223    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node000, 0f32, location.x);
224    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node000, 0f32, location.y);
225    let layout = taffy.layout(node0000).unwrap();
226    let Layout { size, location, .. } = layout;
227    assert_eq!(size.width, 1044f32, "width of node {:?}. Expected {}. Actual {}", node0000, 1044f32, size.width);
228    assert_eq!(size.height, 120f32, "height of node {:?}. Expected {}. Actual {}", node0000, 120f32, size.height);
229    assert_eq!(location.x, 36f32, "x of node {:?}. Expected {}. Actual {}", node0000, 36f32, location.x);
230    assert_eq!(location.y, 24f32, "y of node {:?}. Expected {}. Actual {}", node0000, 24f32, location.y);
231    let layout = taffy.layout(node00000).unwrap();
232    let Layout { size, location, .. } = layout;
233    assert_eq!(size.width, 120f32, "width of node {:?}. Expected {}. Actual {}", node00000, 120f32, size.width);
234    assert_eq!(size.height, 120f32, "height of node {:?}. Expected {}. Actual {}", node00000, 120f32, size.height);
235    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node00000, 0f32, location.x);
236    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00000, 0f32, location.y);
237    let layout = taffy.layout(node000000).unwrap();
238    let Layout { size, location, .. } = layout;
239    assert_eq!(size.width, 120f32, "width of node {:?}. Expected {}. Actual {}", node000000, 120f32, size.width);
240    assert_eq!(size.height, 120f32, "height of node {:?}. Expected {}. Actual {}", node000000, 120f32, size.height);
241    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node000000, 0f32, location.x);
242    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node000000, 0f32, location.y);
243    let layout = taffy.layout(node00001).unwrap();
244    let Layout { size, location, .. } = layout;
245    assert_eq!(size.width, 72f32, "width of node {:?}. Expected {}. Actual {}", node00001, 72f32, size.width);
246    assert_eq!(size.height, 39f32, "height of node {:?}. Expected {}. Actual {}", node00001, 39f32, size.height);
247    assert_eq!(location.x, 120f32, "x of node {:?}. Expected {}. Actual {}", node00001, 120f32, location.x);
248    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00001, 0f32, location.y);
249    let layout = taffy.layout(node000010).unwrap();
250    let Layout { size, location, .. } = layout;
251    assert_eq!(size.width, 0f32, "width of node {:?}. Expected {}. Actual {}", node000010, 0f32, size.width);
252    assert_eq!(size.height, 0f32, "height of node {:?}. Expected {}. Actual {}", node000010, 0f32, size.height);
253    assert_eq!(location.x, 36f32, "x of node {:?}. Expected {}. Actual {}", node000010, 36f32, location.x);
254    assert_eq!(location.y, 21f32, "y of node {:?}. Expected {}. Actual {}", node000010, 21f32, location.y);
255    let layout = taffy.layout(node000011).unwrap();
256    let Layout { size, location, .. } = layout;
257    assert_eq!(size.width, 0f32, "width of node {:?}. Expected {}. Actual {}", node000011, 0f32, size.width);
258    assert_eq!(size.height, 0f32, "height of node {:?}. Expected {}. Actual {}", node000011, 0f32, size.height);
259    assert_eq!(location.x, 36f32, "x of node {:?}. Expected {}. Actual {}", node000011, 36f32, location.x);
260    assert_eq!(location.y, 21f32, "y of node {:?}. Expected {}. Actual {}", node000011, 21f32, location.y);
261    let layout = taffy.layout(node001).unwrap();
262    let Layout { size, location, .. } = layout;
263    assert_eq!(size.width, 1080f32, "width of node {:?}. Expected {}. Actual {}", node001, 1080f32, size.width);
264    assert_eq!(size.height, 96f32, "height of node {:?}. Expected {}. Actual {}", node001, 96f32, size.height);
265    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node001, 0f32, location.x);
266    assert_eq!(location.y, 144f32, "y of node {:?}. Expected {}. Actual {}", node001, 144f32, location.y);
267    let layout = taffy.layout(node0010).unwrap();
268    let Layout { size, location, .. } = layout;
269    assert_eq!(size.width, 906f32, "width of node {:?}. Expected {}. Actual {}", node0010, 906f32, size.width);
270    assert_eq!(size.height, 72f32, "height of node {:?}. Expected {}. Actual {}", node0010, 72f32, size.height);
271    assert_eq!(location.x, 174f32, "x of node {:?}. Expected {}. Actual {}", node0010, 174f32, location.x);
272    assert_eq!(location.y, 24f32, "y of node {:?}. Expected {}. Actual {}", node0010, 24f32, location.y);
273    let layout = taffy.layout(node00100).unwrap();
274    let Layout { size, location, .. } = layout;
275    assert_eq!(size.width, 72f32, "width of node {:?}. Expected {}. Actual {}", node00100, 72f32, size.width);
276    assert_eq!(size.height, 72f32, "height of node {:?}. Expected {}. Actual {}", node00100, 72f32, size.height);
277    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node00100, 0f32, location.x);
278    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00100, 0f32, location.y);
279    let layout = taffy.layout(node001000).unwrap();
280    let Layout { size, location, .. } = layout;
281    assert_eq!(size.width, 72f32, "width of node {:?}. Expected {}. Actual {}", node001000, 72f32, size.width);
282    assert_eq!(size.height, 72f32, "height of node {:?}. Expected {}. Actual {}", node001000, 72f32, size.height);
283    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node001000, 0f32, location.x);
284    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node001000, 0f32, location.y);
285    let layout = taffy.layout(node00101).unwrap();
286    let Layout { size, location, .. } = layout;
287    assert_eq!(size.width, 72f32, "width of node {:?}. Expected {}. Actual {}", node00101, 72f32, size.width);
288    assert_eq!(size.height, 39f32, "height of node {:?}. Expected {}. Actual {}", node00101, 39f32, size.height);
289    assert_eq!(location.x, 72f32, "x of node {:?}. Expected {}. Actual {}", node00101, 72f32, location.x);
290    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00101, 0f32, location.y);
291    let layout = taffy.layout(node001010).unwrap();
292    let Layout { size, location, .. } = layout;
293    assert_eq!(size.width, 0f32, "width of node {:?}. Expected {}. Actual {}", node001010, 0f32, size.width);
294    assert_eq!(size.height, 0f32, "height of node {:?}. Expected {}. Actual {}", node001010, 0f32, size.height);
295    assert_eq!(location.x, 36f32, "x of node {:?}. Expected {}. Actual {}", node001010, 36f32, location.x);
296    assert_eq!(location.y, 21f32, "y of node {:?}. Expected {}. Actual {}", node001010, 21f32, location.y);
297    let layout = taffy.layout(node001011).unwrap();
298    let Layout { size, location, .. } = layout;
299    assert_eq!(size.width, 0f32, "width of node {:?}. Expected {}. Actual {}", node001011, 0f32, size.width);
300    assert_eq!(size.height, 0f32, "height of node {:?}. Expected {}. Actual {}", node001011, 0f32, size.height);
301    assert_eq!(location.x, 36f32, "x of node {:?}. Expected {}. Actual {}", node001011, 36f32, location.x);
302    assert_eq!(location.y, 21f32, "y of node {:?}. Expected {}. Actual {}", node001011, 21f32, location.y);
303}
304
305#[test]
306#[allow(non_snake_case)]
307fn android_news_feed__content_box() {
308    #[allow(unused_imports)]
309    use taffy::{prelude::*, Layout};
310    let mut taffy = crate::new_test_tree();
311    let node000000 = taffy
312        .new_leaf(taffy::style::Style {
313            box_sizing: taffy::style::BoxSizing::ContentBox,
314            align_content: Some(taffy::style::AlignContent::Stretch),
315            flex_shrink: 0f32,
316            size: taffy::geometry::Size {
317                width: taffy::style::Dimension::from_length(120f32),
318                height: taffy::style::Dimension::from_length(120f32),
319            },
320            ..Default::default()
321        })
322        .unwrap();
323    let node00000 = taffy
324        .new_with_children(
325            taffy::style::Style {
326                box_sizing: taffy::style::BoxSizing::ContentBox,
327                align_content: Some(taffy::style::AlignContent::Stretch),
328                flex_shrink: 0f32,
329                ..Default::default()
330            },
331            &[node000000],
332        )
333        .unwrap();
334    let node000010 = taffy
335        .new_leaf(taffy::style::Style {
336            box_sizing: taffy::style::BoxSizing::ContentBox,
337            align_content: Some(taffy::style::AlignContent::Stretch),
338            flex_shrink: 1f32,
339            ..Default::default()
340        })
341        .unwrap();
342    let node000011 = taffy
343        .new_leaf(taffy::style::Style {
344            box_sizing: taffy::style::BoxSizing::ContentBox,
345            align_content: Some(taffy::style::AlignContent::Stretch),
346            flex_shrink: 1f32,
347            ..Default::default()
348        })
349        .unwrap();
350    let node00001 = taffy
351        .new_with_children(
352            taffy::style::Style {
353                box_sizing: taffy::style::BoxSizing::ContentBox,
354                flex_direction: taffy::style::FlexDirection::Column,
355                align_content: Some(taffy::style::AlignContent::Stretch),
356                flex_shrink: 1f32,
357                margin: taffy::geometry::Rect { left: zero(), right: length(36f32), top: zero(), bottom: zero() },
358                padding: taffy::geometry::Rect {
359                    left: length(36f32),
360                    right: length(36f32),
361                    top: length(21f32),
362                    bottom: length(18f32),
363                },
364                ..Default::default()
365            },
366            &[node000010, node000011],
367        )
368        .unwrap();
369    let node0000 = taffy
370        .new_with_children(
371            taffy::style::Style {
372                box_sizing: taffy::style::BoxSizing::ContentBox,
373                align_items: Some(taffy::style::AlignItems::FlexStart),
374                align_content: Some(taffy::style::AlignContent::Stretch),
375                margin: taffy::geometry::Rect {
376                    left: length(36f32),
377                    right: zero(),
378                    top: length(24f32),
379                    bottom: zero(),
380                },
381                ..Default::default()
382            },
383            &[node00000, node00001],
384        )
385        .unwrap();
386    let node000 = taffy
387        .new_with_children(
388            taffy::style::Style {
389                box_sizing: taffy::style::BoxSizing::ContentBox,
390                flex_direction: taffy::style::FlexDirection::Column,
391                align_content: Some(taffy::style::AlignContent::Stretch),
392                ..Default::default()
393            },
394            &[node0000],
395        )
396        .unwrap();
397    let node001000 = taffy
398        .new_leaf(taffy::style::Style {
399            box_sizing: taffy::style::BoxSizing::ContentBox,
400            align_content: Some(taffy::style::AlignContent::Stretch),
401            flex_shrink: 0f32,
402            size: taffy::geometry::Size {
403                width: taffy::style::Dimension::from_length(72f32),
404                height: taffy::style::Dimension::from_length(72f32),
405            },
406            ..Default::default()
407        })
408        .unwrap();
409    let node00100 = taffy
410        .new_with_children(
411            taffy::style::Style {
412                box_sizing: taffy::style::BoxSizing::ContentBox,
413                align_content: Some(taffy::style::AlignContent::Stretch),
414                flex_shrink: 0f32,
415                ..Default::default()
416            },
417            &[node001000],
418        )
419        .unwrap();
420    let node001010 = taffy
421        .new_leaf(taffy::style::Style {
422            box_sizing: taffy::style::BoxSizing::ContentBox,
423            align_content: Some(taffy::style::AlignContent::Stretch),
424            flex_shrink: 1f32,
425            ..Default::default()
426        })
427        .unwrap();
428    let node001011 = taffy
429        .new_leaf(taffy::style::Style {
430            box_sizing: taffy::style::BoxSizing::ContentBox,
431            align_content: Some(taffy::style::AlignContent::Stretch),
432            flex_shrink: 1f32,
433            ..Default::default()
434        })
435        .unwrap();
436    let node00101 = taffy
437        .new_with_children(
438            taffy::style::Style {
439                box_sizing: taffy::style::BoxSizing::ContentBox,
440                flex_direction: taffy::style::FlexDirection::Column,
441                align_content: Some(taffy::style::AlignContent::Stretch),
442                flex_shrink: 1f32,
443                margin: taffy::geometry::Rect { left: zero(), right: length(36f32), top: zero(), bottom: zero() },
444                padding: taffy::geometry::Rect {
445                    left: length(36f32),
446                    right: length(36f32),
447                    top: length(21f32),
448                    bottom: length(18f32),
449                },
450                ..Default::default()
451            },
452            &[node001010, node001011],
453        )
454        .unwrap();
455    let node0010 = taffy
456        .new_with_children(
457            taffy::style::Style {
458                box_sizing: taffy::style::BoxSizing::ContentBox,
459                align_items: Some(taffy::style::AlignItems::FlexStart),
460                align_content: Some(taffy::style::AlignContent::Stretch),
461                margin: taffy::geometry::Rect {
462                    left: length(174f32),
463                    right: zero(),
464                    top: length(24f32),
465                    bottom: zero(),
466                },
467                ..Default::default()
468            },
469            &[node00100, node00101],
470        )
471        .unwrap();
472    let node001 = taffy
473        .new_with_children(
474            taffy::style::Style {
475                box_sizing: taffy::style::BoxSizing::ContentBox,
476                flex_direction: taffy::style::FlexDirection::Column,
477                align_content: Some(taffy::style::AlignContent::Stretch),
478                ..Default::default()
479            },
480            &[node0010],
481        )
482        .unwrap();
483    let node00 = taffy
484        .new_with_children(
485            taffy::style::Style {
486                box_sizing: taffy::style::BoxSizing::ContentBox,
487                flex_direction: taffy::style::FlexDirection::Column,
488                align_content: Some(taffy::style::AlignContent::Stretch),
489                ..Default::default()
490            },
491            &[node000, node001],
492        )
493        .unwrap();
494    let node0 = taffy
495        .new_with_children(
496            taffy::style::Style {
497                box_sizing: taffy::style::BoxSizing::ContentBox,
498                flex_direction: taffy::style::FlexDirection::Column,
499                flex_shrink: 0f32,
500                ..Default::default()
501            },
502            &[node00],
503        )
504        .unwrap();
505    let node = taffy
506        .new_with_children(
507            taffy::style::Style {
508                box_sizing: taffy::style::BoxSizing::ContentBox,
509                flex_direction: taffy::style::FlexDirection::Column,
510                align_content: Some(taffy::style::AlignContent::Stretch),
511                flex_shrink: 0f32,
512                size: taffy::geometry::Size { width: taffy::style::Dimension::from_length(1080f32), height: auto() },
513                ..Default::default()
514            },
515            &[node0],
516        )
517        .unwrap();
518    taffy.compute_layout_with_measure(node, taffy::geometry::Size::MAX_CONTENT, crate::test_measure_function).unwrap();
519    println!("\nComputed tree:");
520    taffy.print_tree(node);
521    println!();
522    let layout = taffy.layout(node).unwrap();
523    let Layout { size, location, .. } = layout;
524    assert_eq!(size.width, 1080f32, "width of node {:?}. Expected {}. Actual {}", node, 1080f32, size.width);
525    assert_eq!(size.height, 240f32, "height of node {:?}. Expected {}. Actual {}", node, 240f32, size.height);
526    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
527    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
528    let layout = taffy.layout(node0).unwrap();
529    let Layout { size, location, .. } = layout;
530    assert_eq!(size.width, 1080f32, "width of node {:?}. Expected {}. Actual {}", node0, 1080f32, size.width);
531    assert_eq!(size.height, 240f32, "height of node {:?}. Expected {}. Actual {}", node0, 240f32, size.height);
532    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node0, 0f32, location.x);
533    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node0, 0f32, location.y);
534    let layout = taffy.layout(node00).unwrap();
535    let Layout { size, location, .. } = layout;
536    assert_eq!(size.width, 1080f32, "width of node {:?}. Expected {}. Actual {}", node00, 1080f32, size.width);
537    assert_eq!(size.height, 240f32, "height of node {:?}. Expected {}. Actual {}", node00, 240f32, size.height);
538    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node00, 0f32, location.x);
539    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00, 0f32, location.y);
540    let layout = taffy.layout(node000).unwrap();
541    let Layout { size, location, .. } = layout;
542    assert_eq!(size.width, 1080f32, "width of node {:?}. Expected {}. Actual {}", node000, 1080f32, size.width);
543    assert_eq!(size.height, 144f32, "height of node {:?}. Expected {}. Actual {}", node000, 144f32, size.height);
544    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node000, 0f32, location.x);
545    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node000, 0f32, location.y);
546    let layout = taffy.layout(node0000).unwrap();
547    let Layout { size, location, .. } = layout;
548    assert_eq!(size.width, 1044f32, "width of node {:?}. Expected {}. Actual {}", node0000, 1044f32, size.width);
549    assert_eq!(size.height, 120f32, "height of node {:?}. Expected {}. Actual {}", node0000, 120f32, size.height);
550    assert_eq!(location.x, 36f32, "x of node {:?}. Expected {}. Actual {}", node0000, 36f32, location.x);
551    assert_eq!(location.y, 24f32, "y of node {:?}. Expected {}. Actual {}", node0000, 24f32, location.y);
552    let layout = taffy.layout(node00000).unwrap();
553    let Layout { size, location, .. } = layout;
554    assert_eq!(size.width, 120f32, "width of node {:?}. Expected {}. Actual {}", node00000, 120f32, size.width);
555    assert_eq!(size.height, 120f32, "height of node {:?}. Expected {}. Actual {}", node00000, 120f32, size.height);
556    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node00000, 0f32, location.x);
557    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00000, 0f32, location.y);
558    let layout = taffy.layout(node000000).unwrap();
559    let Layout { size, location, .. } = layout;
560    assert_eq!(size.width, 120f32, "width of node {:?}. Expected {}. Actual {}", node000000, 120f32, size.width);
561    assert_eq!(size.height, 120f32, "height of node {:?}. Expected {}. Actual {}", node000000, 120f32, size.height);
562    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node000000, 0f32, location.x);
563    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node000000, 0f32, location.y);
564    let layout = taffy.layout(node00001).unwrap();
565    let Layout { size, location, .. } = layout;
566    assert_eq!(size.width, 72f32, "width of node {:?}. Expected {}. Actual {}", node00001, 72f32, size.width);
567    assert_eq!(size.height, 39f32, "height of node {:?}. Expected {}. Actual {}", node00001, 39f32, size.height);
568    assert_eq!(location.x, 120f32, "x of node {:?}. Expected {}. Actual {}", node00001, 120f32, location.x);
569    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00001, 0f32, location.y);
570    let layout = taffy.layout(node000010).unwrap();
571    let Layout { size, location, .. } = layout;
572    assert_eq!(size.width, 0f32, "width of node {:?}. Expected {}. Actual {}", node000010, 0f32, size.width);
573    assert_eq!(size.height, 0f32, "height of node {:?}. Expected {}. Actual {}", node000010, 0f32, size.height);
574    assert_eq!(location.x, 36f32, "x of node {:?}. Expected {}. Actual {}", node000010, 36f32, location.x);
575    assert_eq!(location.y, 21f32, "y of node {:?}. Expected {}. Actual {}", node000010, 21f32, location.y);
576    let layout = taffy.layout(node000011).unwrap();
577    let Layout { size, location, .. } = layout;
578    assert_eq!(size.width, 0f32, "width of node {:?}. Expected {}. Actual {}", node000011, 0f32, size.width);
579    assert_eq!(size.height, 0f32, "height of node {:?}. Expected {}. Actual {}", node000011, 0f32, size.height);
580    assert_eq!(location.x, 36f32, "x of node {:?}. Expected {}. Actual {}", node000011, 36f32, location.x);
581    assert_eq!(location.y, 21f32, "y of node {:?}. Expected {}. Actual {}", node000011, 21f32, location.y);
582    let layout = taffy.layout(node001).unwrap();
583    let Layout { size, location, .. } = layout;
584    assert_eq!(size.width, 1080f32, "width of node {:?}. Expected {}. Actual {}", node001, 1080f32, size.width);
585    assert_eq!(size.height, 96f32, "height of node {:?}. Expected {}. Actual {}", node001, 96f32, size.height);
586    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node001, 0f32, location.x);
587    assert_eq!(location.y, 144f32, "y of node {:?}. Expected {}. Actual {}", node001, 144f32, location.y);
588    let layout = taffy.layout(node0010).unwrap();
589    let Layout { size, location, .. } = layout;
590    assert_eq!(size.width, 906f32, "width of node {:?}. Expected {}. Actual {}", node0010, 906f32, size.width);
591    assert_eq!(size.height, 72f32, "height of node {:?}. Expected {}. Actual {}", node0010, 72f32, size.height);
592    assert_eq!(location.x, 174f32, "x of node {:?}. Expected {}. Actual {}", node0010, 174f32, location.x);
593    assert_eq!(location.y, 24f32, "y of node {:?}. Expected {}. Actual {}", node0010, 24f32, location.y);
594    let layout = taffy.layout(node00100).unwrap();
595    let Layout { size, location, .. } = layout;
596    assert_eq!(size.width, 72f32, "width of node {:?}. Expected {}. Actual {}", node00100, 72f32, size.width);
597    assert_eq!(size.height, 72f32, "height of node {:?}. Expected {}. Actual {}", node00100, 72f32, size.height);
598    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node00100, 0f32, location.x);
599    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00100, 0f32, location.y);
600    let layout = taffy.layout(node001000).unwrap();
601    let Layout { size, location, .. } = layout;
602    assert_eq!(size.width, 72f32, "width of node {:?}. Expected {}. Actual {}", node001000, 72f32, size.width);
603    assert_eq!(size.height, 72f32, "height of node {:?}. Expected {}. Actual {}", node001000, 72f32, size.height);
604    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node001000, 0f32, location.x);
605    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node001000, 0f32, location.y);
606    let layout = taffy.layout(node00101).unwrap();
607    let Layout { size, location, .. } = layout;
608    assert_eq!(size.width, 72f32, "width of node {:?}. Expected {}. Actual {}", node00101, 72f32, size.width);
609    assert_eq!(size.height, 39f32, "height of node {:?}. Expected {}. Actual {}", node00101, 39f32, size.height);
610    assert_eq!(location.x, 72f32, "x of node {:?}. Expected {}. Actual {}", node00101, 72f32, location.x);
611    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00101, 0f32, location.y);
612    let layout = taffy.layout(node001010).unwrap();
613    let Layout { size, location, .. } = layout;
614    assert_eq!(size.width, 0f32, "width of node {:?}. Expected {}. Actual {}", node001010, 0f32, size.width);
615    assert_eq!(size.height, 0f32, "height of node {:?}. Expected {}. Actual {}", node001010, 0f32, size.height);
616    assert_eq!(location.x, 36f32, "x of node {:?}. Expected {}. Actual {}", node001010, 36f32, location.x);
617    assert_eq!(location.y, 21f32, "y of node {:?}. Expected {}. Actual {}", node001010, 21f32, location.y);
618    let layout = taffy.layout(node001011).unwrap();
619    let Layout { size, location, .. } = layout;
620    assert_eq!(size.width, 0f32, "width of node {:?}. Expected {}. Actual {}", node001011, 0f32, size.width);
621    assert_eq!(size.height, 0f32, "height of node {:?}. Expected {}. Actual {}", node001011, 0f32, size.height);
622    assert_eq!(location.x, 36f32, "x of node {:?}. Expected {}. Actual {}", node001011, 36f32, location.x);
623    assert_eq!(location.y, 21f32, "y of node {:?}. Expected {}. Actual {}", node001011, 21f32, location.y);
624}