@@ -310,7 +310,7 @@ pub fn aspect_ratio_in_block_width_fixed() {
310310 let child = as_ref ( Node :: new_ptr ( ) ) ;
311311 child. set_width ( DefLength :: Points ( Len :: from_f32 ( 100. ) ) ) ;
312312 child. set_height ( DefLength :: Auto ) ;
313- child. set_aspect_ratio ( Some ( 1 . / 1. ) ) ;
313+ child. set_aspect_ratio ( Some ( 2 . / 1. ) ) ;
314314 container. append_child ( convert_node_ref_to_ptr ( child) ) ;
315315
316316 root. layout (
@@ -319,7 +319,7 @@ pub fn aspect_ratio_in_block_width_fixed() {
319319 ) ;
320320
321321 assert_eq ! ( child. layout_position( ) . width, 100. ) ;
322- assert_eq ! ( child. layout_position( ) . height, 100 .) ;
322+ assert_eq ! ( child. layout_position( ) . height, 50 .) ;
323323 }
324324}
325325
@@ -335,15 +335,15 @@ pub fn aspect_ratio_in_block_height_fixed() {
335335 let child = as_ref ( Node :: new_ptr ( ) ) ;
336336 child. set_width ( DefLength :: Auto ) ;
337337 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. ) ) ;
339339 container. append_child ( convert_node_ref_to_ptr ( child) ) ;
340340
341341 root. layout (
342342 OptionSize :: new ( OptionNum :: some ( Len :: from_f32 ( 400. ) ) , OptionNum :: none ( ) ) ,
343343 Size :: new ( Len :: from_f32 ( 0. ) , Len :: from_f32 ( 0. ) ) ,
344344 ) ;
345345
346- assert_eq ! ( child. layout_position( ) . width, 100 .) ;
346+ assert_eq ! ( child. layout_position( ) . width, 200 .) ;
347347 assert_eq ! ( child. layout_position( ) . height, 100. ) ;
348348 }
349349}
0 commit comments