⎇ 368b7da13d700e20ed1ef0fa2399fade0ca5ea3f
tests/generated/flex/rounding_fractial_input_7.rs
History
Who touched what
raw
Use tagged pointer to represent size/length values (#769)
1#[test]
2#[allow(non_snake_case)]
3fn rounding_fractial_input_7__border_box() {
4 #[allow(unused_imports)]
5 use taffy::{prelude::*, Layout};
6 let mut taffy = crate::new_test_tree();
7 let node00 = taffy
8 .new_leaf(taffy::style::Style {
9 size: taffy::geometry::Size {
10 width: taffy::style::Dimension::from_length(1f32),
11 height: taffy::style::Dimension::from_length(10f32),
12 },
13 ..Default::default()
14 })
15 .unwrap();
16 let node01 = taffy
17 .new_leaf(taffy::style::Style {
18 size: taffy::geometry::Size {
19 width: taffy::style::Dimension::from_length(1f32),
20 height: taffy::style::Dimension::from_length(10f32),
21 },
22 ..Default::default()
23 })
24 .unwrap();
25 let node0 = taffy
26 .new_with_children(
27 taffy::style::Style {
28 flex_wrap: taffy::style::FlexWrap::Wrap,
29 size: taffy::geometry::Size { width: taffy::style::Dimension::from_percent(0.25f32), height: auto() },
30 ..Default::default()
31 },
32 &[node00, node01],
33 )
34 .unwrap();
35 let node10 = taffy
36 .new_leaf(taffy::style::Style {
37 size: taffy::geometry::Size {
38 width: taffy::style::Dimension::from_length(1f32),
39 height: taffy::style::Dimension::from_length(10f32),
40 },
41 ..Default::default()
42 })
43 .unwrap();
44 let node11 = taffy
45 .new_leaf(taffy::style::Style {
46 size: taffy::geometry::Size {
47 width: taffy::style::Dimension::from_length(1f32),
48 height: taffy::style::Dimension::from_length(10f32),
49 },
50 ..Default::default()
51 })
52 .unwrap();
53 let node1 = taffy
54 .new_with_children(
55 taffy::style::Style {
56 flex_wrap: taffy::style::FlexWrap::Wrap,
57 size: taffy::geometry::Size { width: taffy::style::Dimension::from_percent(0.25f32), height: auto() },
58 ..Default::default()
59 },
60 &[node10, node11],
61 )
62 .unwrap();
63 let node20 = taffy
64 .new_leaf(taffy::style::Style {
65 size: taffy::geometry::Size {
66 width: taffy::style::Dimension::from_length(1f32),
67 height: taffy::style::Dimension::from_length(10f32),
68 },
69 ..Default::default()
70 })
71 .unwrap();
72 let node21 = taffy
73 .new_leaf(taffy::style::Style {
74 size: taffy::geometry::Size {
75 width: taffy::style::Dimension::from_length(1f32),
76 height: taffy::style::Dimension::from_length(10f32),
77 },
78 ..Default::default()
79 })
80 .unwrap();
81 let node2 = taffy
82 .new_with_children(
83 taffy::style::Style {
84 flex_wrap: taffy::style::FlexWrap::Wrap,
85 size: taffy::geometry::Size { width: taffy::style::Dimension::from_percent(0.25f32), height: auto() },
86 ..Default::default()
87 },
88 &[node20, node21],
89 )
90 .unwrap();
91 let node30 = taffy
92 .new_leaf(taffy::style::Style {
93 size: taffy::geometry::Size {
94 width: taffy::style::Dimension::from_length(1f32),
95 height: taffy::style::Dimension::from_length(10f32),
96 },
97 ..Default::default()
98 })
99 .unwrap();
100 let node31 = taffy
101 .new_leaf(taffy::style::Style {
102 size: taffy::geometry::Size {
103 width: taffy::style::Dimension::from_length(1f32),
104 height: taffy::style::Dimension::from_length(10f32),
105 },
106 ..Default::default()
107 })
108 .unwrap();
109 let node3 = taffy
110 .new_with_children(
111 taffy::style::Style {
112 flex_wrap: taffy::style::FlexWrap::Wrap,
113 size: taffy::geometry::Size { width: taffy::style::Dimension::from_percent(0.25f32), height: auto() },
114 ..Default::default()
115 },
116 &[node30, node31],
117 )
118 .unwrap();
119 let node = taffy
120 .new_with_children(
121 taffy::style::Style {
122 size: taffy::geometry::Size { width: taffy::style::Dimension::from_length(7f32), height: auto() },
123 ..Default::default()
124 },
125 &[node0, node1, node2, node3],
126 )
127 .unwrap();
128 taffy.compute_layout_with_measure(node, taffy::geometry::Size::MAX_CONTENT, crate::test_measure_function).unwrap();
129 println!("\nComputed tree:");
130 taffy.print_tree(node);
131 println!();
132 let layout = taffy.layout(node).unwrap();
133 let Layout { size, location, .. } = layout;
134 assert_eq!(size.width, 7f32, "width of node {:?}. Expected {}. Actual {}", node, 7f32, size.width);
135 assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node, 20f32, size.height);
136 assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
137 assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
138 let layout = taffy.layout(node0).unwrap();
139 let Layout { size, location, .. } = layout;
140 assert_eq!(size.width, 2f32, "width of node {:?}. Expected {}. Actual {}", node0, 2f32, size.width);
141 assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node0, 20f32, size.height);
142 assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node0, 0f32, location.x);
143 assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node0, 0f32, location.y);
144 let layout = taffy.layout(node00).unwrap();
145 let Layout { size, location, .. } = layout;
146 assert_eq!(size.width, 1f32, "width of node {:?}. Expected {}. Actual {}", node00, 1f32, size.width);
147 assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node00, 10f32, size.height);
148 assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node00, 0f32, location.x);
149 assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00, 0f32, location.y);
150 let layout = taffy.layout(node01).unwrap();
151 let Layout { size, location, .. } = layout;
152 assert_eq!(size.width, 1f32, "width of node {:?}. Expected {}. Actual {}", node01, 1f32, size.width);
153 assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node01, 10f32, size.height);
154 assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node01, 0f32, location.x);
155 assert_eq!(location.y, 10f32, "y of node {:?}. Expected {}. Actual {}", node01, 10f32, location.y);
156 let layout = taffy.layout(node1).unwrap();
157 let Layout { size, location, .. } = layout;
158 assert_eq!(size.width, 2f32, "width of node {:?}. Expected {}. Actual {}", node1, 2f32, size.width);
159 assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node1, 20f32, size.height);
160 assert_eq!(location.x, 2f32, "x of node {:?}. Expected {}. Actual {}", node1, 2f32, location.x);
161 assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node1, 0f32, location.y);
162 let layout = taffy.layout(node10).unwrap();
163 let Layout { size, location, .. } = layout;
164 assert_eq!(size.width, 1f32, "width of node {:?}. Expected {}. Actual {}", node10, 1f32, size.width);
165 assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node10, 10f32, size.height);
166 assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node10, 0f32, location.x);
167 assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node10, 0f32, location.y);
168 let layout = taffy.layout(node11).unwrap();
169 let Layout { size, location, .. } = layout;
170 assert_eq!(size.width, 1f32, "width of node {:?}. Expected {}. Actual {}", node11, 1f32, size.width);
171 assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node11, 10f32, size.height);
172 assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node11, 0f32, location.x);
173 assert_eq!(location.y, 10f32, "y of node {:?}. Expected {}. Actual {}", node11, 10f32, location.y);
174 let layout = taffy.layout(node2).unwrap();
175 let Layout { size, location, .. } = layout;
176 assert_eq!(size.width, 1f32, "width of node {:?}. Expected {}. Actual {}", node2, 1f32, size.width);
177 assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node2, 20f32, size.height);
178 assert_eq!(location.x, 4f32, "x of node {:?}. Expected {}. Actual {}", node2, 4f32, location.x);
179 assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node2, 0f32, location.y);
180 let layout = taffy.layout(node20).unwrap();
181 let Layout { size, location, .. } = layout;
182 assert_eq!(size.width, 1f32, "width of node {:?}. Expected {}. Actual {}", node20, 1f32, size.width);
183 assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node20, 10f32, size.height);
184 assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node20, 0f32, location.x);
185 assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node20, 0f32, location.y);
186 let layout = taffy.layout(node21).unwrap();
187 let Layout { size, location, .. } = layout;
188 assert_eq!(size.width, 1f32, "width of node {:?}. Expected {}. Actual {}", node21, 1f32, size.width);
189 assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node21, 10f32, size.height);
190 assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node21, 0f32, location.x);
191 assert_eq!(location.y, 10f32, "y of node {:?}. Expected {}. Actual {}", node21, 10f32, location.y);
192 let layout = taffy.layout(node3).unwrap();
193 let Layout { size, location, .. } = layout;
194 assert_eq!(size.width, 2f32, "width of node {:?}. Expected {}. Actual {}", node3, 2f32, size.width);
195 assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node3, 20f32, size.height);
196 assert_eq!(location.x, 5f32, "x of node {:?}. Expected {}. Actual {}", node3, 5f32, location.x);
197 assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node3, 0f32, location.y);
198 let layout = taffy.layout(node30).unwrap();
199 let Layout { size, location, .. } = layout;
200 assert_eq!(size.width, 1f32, "width of node {:?}. Expected {}. Actual {}", node30, 1f32, size.width);
201 assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node30, 10f32, size.height);
202 assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node30, 0f32, location.x);
203 assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node30, 0f32, location.y);
204 let layout = taffy.layout(node31).unwrap();
205 let Layout { size, location, .. } = layout;
206 assert_eq!(size.width, 1f32, "width of node {:?}. Expected {}. Actual {}", node31, 1f32, size.width);
207 assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node31, 10f32, size.height);
208 assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node31, 0f32, location.x);
209 assert_eq!(location.y, 10f32, "y of node {:?}. Expected {}. Actual {}", node31, 10f32, location.y);
210}
211
212#[test]
213#[allow(non_snake_case)]
214fn rounding_fractial_input_7__content_box() {
215 #[allow(unused_imports)]
216 use taffy::{prelude::*, Layout};
217 let mut taffy = crate::new_test_tree();
218 let node00 = taffy
219 .new_leaf(taffy::style::Style {
220 box_sizing: taffy::style::BoxSizing::ContentBox,
221 size: taffy::geometry::Size {
222 width: taffy::style::Dimension::from_length(1f32),
223 height: taffy::style::Dimension::from_length(10f32),
224 },
225 ..Default::default()
226 })
227 .unwrap();
228 let node01 = taffy
229 .new_leaf(taffy::style::Style {
230 box_sizing: taffy::style::BoxSizing::ContentBox,
231 size: taffy::geometry::Size {
232 width: taffy::style::Dimension::from_length(1f32),
233 height: taffy::style::Dimension::from_length(10f32),
234 },
235 ..Default::default()
236 })
237 .unwrap();
238 let node0 = taffy
239 .new_with_children(
240 taffy::style::Style {
241 box_sizing: taffy::style::BoxSizing::ContentBox,
242 flex_wrap: taffy::style::FlexWrap::Wrap,
243 size: taffy::geometry::Size { width: taffy::style::Dimension::from_percent(0.25f32), height: auto() },
244 ..Default::default()
245 },
246 &[node00, node01],
247 )
248 .unwrap();
249 let node10 = taffy
250 .new_leaf(taffy::style::Style {
251 box_sizing: taffy::style::BoxSizing::ContentBox,
252 size: taffy::geometry::Size {
253 width: taffy::style::Dimension::from_length(1f32),
254 height: taffy::style::Dimension::from_length(10f32),
255 },
256 ..Default::default()
257 })
258 .unwrap();
259 let node11 = taffy
260 .new_leaf(taffy::style::Style {
261 box_sizing: taffy::style::BoxSizing::ContentBox,
262 size: taffy::geometry::Size {
263 width: taffy::style::Dimension::from_length(1f32),
264 height: taffy::style::Dimension::from_length(10f32),
265 },
266 ..Default::default()
267 })
268 .unwrap();
269 let node1 = taffy
270 .new_with_children(
271 taffy::style::Style {
272 box_sizing: taffy::style::BoxSizing::ContentBox,
273 flex_wrap: taffy::style::FlexWrap::Wrap,
274 size: taffy::geometry::Size { width: taffy::style::Dimension::from_percent(0.25f32), height: auto() },
275 ..Default::default()
276 },
277 &[node10, node11],
278 )
279 .unwrap();
280 let node20 = taffy
281 .new_leaf(taffy::style::Style {
282 box_sizing: taffy::style::BoxSizing::ContentBox,
283 size: taffy::geometry::Size {
284 width: taffy::style::Dimension::from_length(1f32),
285 height: taffy::style::Dimension::from_length(10f32),
286 },
287 ..Default::default()
288 })
289 .unwrap();
290 let node21 = taffy
291 .new_leaf(taffy::style::Style {
292 box_sizing: taffy::style::BoxSizing::ContentBox,
293 size: taffy::geometry::Size {
294 width: taffy::style::Dimension::from_length(1f32),
295 height: taffy::style::Dimension::from_length(10f32),
296 },
297 ..Default::default()
298 })
299 .unwrap();
300 let node2 = taffy
301 .new_with_children(
302 taffy::style::Style {
303 box_sizing: taffy::style::BoxSizing::ContentBox,
304 flex_wrap: taffy::style::FlexWrap::Wrap,
305 size: taffy::geometry::Size { width: taffy::style::Dimension::from_percent(0.25f32), height: auto() },
306 ..Default::default()
307 },
308 &[node20, node21],
309 )
310 .unwrap();
311 let node30 = taffy
312 .new_leaf(taffy::style::Style {
313 box_sizing: taffy::style::BoxSizing::ContentBox,
314 size: taffy::geometry::Size {
315 width: taffy::style::Dimension::from_length(1f32),
316 height: taffy::style::Dimension::from_length(10f32),
317 },
318 ..Default::default()
319 })
320 .unwrap();
321 let node31 = taffy
322 .new_leaf(taffy::style::Style {
323 box_sizing: taffy::style::BoxSizing::ContentBox,
324 size: taffy::geometry::Size {
325 width: taffy::style::Dimension::from_length(1f32),
326 height: taffy::style::Dimension::from_length(10f32),
327 },
328 ..Default::default()
329 })
330 .unwrap();
331 let node3 = taffy
332 .new_with_children(
333 taffy::style::Style {
334 box_sizing: taffy::style::BoxSizing::ContentBox,
335 flex_wrap: taffy::style::FlexWrap::Wrap,
336 size: taffy::geometry::Size { width: taffy::style::Dimension::from_percent(0.25f32), height: auto() },
337 ..Default::default()
338 },
339 &[node30, node31],
340 )
341 .unwrap();
342 let node = taffy
343 .new_with_children(
344 taffy::style::Style {
345 box_sizing: taffy::style::BoxSizing::ContentBox,
346 size: taffy::geometry::Size { width: taffy::style::Dimension::from_length(7f32), height: auto() },
347 ..Default::default()
348 },
349 &[node0, node1, node2, node3],
350 )
351 .unwrap();
352 taffy.compute_layout_with_measure(node, taffy::geometry::Size::MAX_CONTENT, crate::test_measure_function).unwrap();
353 println!("\nComputed tree:");
354 taffy.print_tree(node);
355 println!();
356 let layout = taffy.layout(node).unwrap();
357 let Layout { size, location, .. } = layout;
358 assert_eq!(size.width, 7f32, "width of node {:?}. Expected {}. Actual {}", node, 7f32, size.width);
359 assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node, 20f32, size.height);
360 assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node, 0f32, location.x);
361 assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node, 0f32, location.y);
362 let layout = taffy.layout(node0).unwrap();
363 let Layout { size, location, .. } = layout;
364 assert_eq!(size.width, 2f32, "width of node {:?}. Expected {}. Actual {}", node0, 2f32, size.width);
365 assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node0, 20f32, size.height);
366 assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node0, 0f32, location.x);
367 assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node0, 0f32, location.y);
368 let layout = taffy.layout(node00).unwrap();
369 let Layout { size, location, .. } = layout;
370 assert_eq!(size.width, 1f32, "width of node {:?}. Expected {}. Actual {}", node00, 1f32, size.width);
371 assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node00, 10f32, size.height);
372 assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node00, 0f32, location.x);
373 assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node00, 0f32, location.y);
374 let layout = taffy.layout(node01).unwrap();
375 let Layout { size, location, .. } = layout;
376 assert_eq!(size.width, 1f32, "width of node {:?}. Expected {}. Actual {}", node01, 1f32, size.width);
377 assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node01, 10f32, size.height);
378 assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node01, 0f32, location.x);
379 assert_eq!(location.y, 10f32, "y of node {:?}. Expected {}. Actual {}", node01, 10f32, location.y);
380 let layout = taffy.layout(node1).unwrap();
381 let Layout { size, location, .. } = layout;
382 assert_eq!(size.width, 2f32, "width of node {:?}. Expected {}. Actual {}", node1, 2f32, size.width);
383 assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node1, 20f32, size.height);
384 assert_eq!(location.x, 2f32, "x of node {:?}. Expected {}. Actual {}", node1, 2f32, location.x);
385 assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node1, 0f32, location.y);
386 let layout = taffy.layout(node10).unwrap();
387 let Layout { size, location, .. } = layout;
388 assert_eq!(size.width, 1f32, "width of node {:?}. Expected {}. Actual {}", node10, 1f32, size.width);
389 assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node10, 10f32, size.height);
390 assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node10, 0f32, location.x);
391 assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node10, 0f32, location.y);
392 let layout = taffy.layout(node11).unwrap();
393 let Layout { size, location, .. } = layout;
394 assert_eq!(size.width, 1f32, "width of node {:?}. Expected {}. Actual {}", node11, 1f32, size.width);
395 assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node11, 10f32, size.height);
396 assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node11, 0f32, location.x);
397 assert_eq!(location.y, 10f32, "y of node {:?}. Expected {}. Actual {}", node11, 10f32, location.y);
398 let layout = taffy.layout(node2).unwrap();
399 let Layout { size, location, .. } = layout;
400 assert_eq!(size.width, 1f32, "width of node {:?}. Expected {}. Actual {}", node2, 1f32, size.width);
401 assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node2, 20f32, size.height);
402 assert_eq!(location.x, 4f32, "x of node {:?}. Expected {}. Actual {}", node2, 4f32, location.x);
403 assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node2, 0f32, location.y);
404 let layout = taffy.layout(node20).unwrap();
405 let Layout { size, location, .. } = layout;
406 assert_eq!(size.width, 1f32, "width of node {:?}. Expected {}. Actual {}", node20, 1f32, size.width);
407 assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node20, 10f32, size.height);
408 assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node20, 0f32, location.x);
409 assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node20, 0f32, location.y);
410 let layout = taffy.layout(node21).unwrap();
411 let Layout { size, location, .. } = layout;
412 assert_eq!(size.width, 1f32, "width of node {:?}. Expected {}. Actual {}", node21, 1f32, size.width);
413 assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node21, 10f32, size.height);
414 assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node21, 0f32, location.x);
415 assert_eq!(location.y, 10f32, "y of node {:?}. Expected {}. Actual {}", node21, 10f32, location.y);
416 let layout = taffy.layout(node3).unwrap();
417 let Layout { size, location, .. } = layout;
418 assert_eq!(size.width, 2f32, "width of node {:?}. Expected {}. Actual {}", node3, 2f32, size.width);
419 assert_eq!(size.height, 20f32, "height of node {:?}. Expected {}. Actual {}", node3, 20f32, size.height);
420 assert_eq!(location.x, 5f32, "x of node {:?}. Expected {}. Actual {}", node3, 5f32, location.x);
421 assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node3, 0f32, location.y);
422 let layout = taffy.layout(node30).unwrap();
423 let Layout { size, location, .. } = layout;
424 assert_eq!(size.width, 1f32, "width of node {:?}. Expected {}. Actual {}", node30, 1f32, size.width);
425 assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node30, 10f32, size.height);
426 assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node30, 0f32, location.x);
427 assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node30, 0f32, location.y);
428 let layout = taffy.layout(node31).unwrap();
429 let Layout { size, location, .. } = layout;
430 assert_eq!(size.width, 1f32, "width of node {:?}. Expected {}. Actual {}", node31, 1f32, size.width);
431 assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node31, 10f32, size.height);
432 assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node31, 0f32, location.x);
433 assert_eq!(location.y, 10f32, "y of node {:?}. Expected {}. Actual {}", node31, 10f32, location.y);
434}