@@ -310,7 +310,7 @@ pub fn aspect_ratio_in_block_width_fixed() {
310
310
let child = as_ref ( Node :: new_ptr ( ) ) ;
311
311
child. set_width ( DefLength :: Points ( Len :: from_f32 ( 100. ) ) ) ;
312
312
child. set_height ( DefLength :: Auto ) ;
313
- child. set_aspect_ratio ( Some ( 1 . / 1. ) ) ;
313
+ child. set_aspect_ratio ( Some ( 2 . / 1. ) ) ;
314
314
container. append_child ( convert_node_ref_to_ptr ( child) ) ;
315
315
316
316
root. layout (
@@ -319,7 +319,7 @@ pub fn aspect_ratio_in_block_width_fixed() {
319
319
) ;
320
320
321
321
assert_eq ! ( child. layout_position( ) . width, 100. ) ;
322
- assert_eq ! ( child. layout_position( ) . height, 100 .) ;
322
+ assert_eq ! ( child. layout_position( ) . height, 50 .) ;
323
323
}
324
324
}
325
325
@@ -335,15 +335,15 @@ pub fn aspect_ratio_in_block_height_fixed() {
335
335
let child = as_ref ( Node :: new_ptr ( ) ) ;
336
336
child. set_width ( DefLength :: Auto ) ;
337
337
child. set_height ( DefLength :: Points ( Len :: from_f32 ( 100. ) ) ) ;
338
- child. set_aspect_ratio ( Some ( 1 . / 1. ) ) ;
338
+ child. set_aspect_ratio ( Some ( 2 . / 1. ) ) ;
339
339
container. append_child ( convert_node_ref_to_ptr ( child) ) ;
340
340
341
341
root. layout (
342
342
OptionSize :: new ( OptionNum :: some ( Len :: from_f32 ( 400. ) ) , OptionNum :: none ( ) ) ,
343
343
Size :: new ( Len :: from_f32 ( 0. ) , Len :: from_f32 ( 0. ) ) ,
344
344
) ;
345
345
346
- assert_eq ! ( child. layout_position( ) . width, 100 .) ;
346
+ assert_eq ! ( child. layout_position( ) . width, 200 .) ;
347
347
assert_eq ! ( child. layout_position( ) . height, 100. ) ;
348
348
}
349
349
}
0 commit comments