gioser

tawasuyu/taffy

A high performance rust-powered UI layout library

Rust 499HTML 238Markdown 7TOML 31442 Definiciones

⎇ 04e20d1de5cd584bf0760071cf130dd55f5b0089 tests/generated/flex/android_news_feed.rs Rust · 618 líneas · 25.1 KB Historia Quién tocó qué crudo

Rename Taffy struct to TaffyTree (#580) 17235ffa2 · Nico Burns ·

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