@@ -394,8 +394,8 @@ mod tests {
394394 use crate :: aabb:: Bounded ;
395395 use crate :: bounding_hierarchy:: BHShape ;
396396 use crate :: testbase:: {
397- build_some_bh , create_n_cubes , default_bounds , randomly_transform_scene , TBvh3 , TBvhNode3 ,
398- TPoint3 , UnitBox ,
397+ TBvh3 , TBvhNode3 , TPoint3 , UnitBox , build_some_bh , create_n_cubes , default_bounds ,
398+ randomly_transform_scene ,
399399 } ;
400400 use std:: collections:: HashSet ;
401401
@@ -567,18 +567,26 @@ mod tests {
567567 assert_eq ! ( nodes[ 5 ] . parent( ) , 1 ) ;
568568 assert_eq ! ( nodes[ 6 ] . parent( ) , 2 ) ;
569569
570- assert ! ( nodes[ 1 ]
571- . child_l_aabb( )
572- . relative_eq( & shapes[ 2 ] . aabb( ) , f32 :: EPSILON ) ) ;
573- assert ! ( nodes[ 1 ]
574- . child_r_aabb( )
575- . relative_eq( & shapes[ 1 ] . aabb( ) , f32 :: EPSILON ) ) ;
576- assert ! ( nodes[ 2 ]
577- . child_l_aabb( )
578- . relative_eq( & shapes[ 0 ] . aabb( ) , f32 :: EPSILON ) ) ;
579- assert ! ( nodes[ 2 ]
580- . child_r_aabb( )
581- . relative_eq( & shapes[ 3 ] . aabb( ) , f32 :: EPSILON ) ) ;
570+ assert ! (
571+ nodes[ 1 ]
572+ . child_l_aabb( )
573+ . relative_eq( & shapes[ 2 ] . aabb( ) , f32 :: EPSILON )
574+ ) ;
575+ assert ! (
576+ nodes[ 1 ]
577+ . child_r_aabb( )
578+ . relative_eq( & shapes[ 1 ] . aabb( ) , f32 :: EPSILON )
579+ ) ;
580+ assert ! (
581+ nodes[ 2 ]
582+ . child_l_aabb( )
583+ . relative_eq( & shapes[ 0 ] . aabb( ) , f32 :: EPSILON )
584+ ) ;
585+ assert ! (
586+ nodes[ 2 ]
587+ . child_r_aabb( )
588+ . relative_eq( & shapes[ 3 ] . aabb( ) , f32 :: EPSILON )
589+ ) ;
582590 }
583591
584592 #[ test]
@@ -609,18 +617,26 @@ mod tests {
609617 assert_eq ! ( nodes[ 5 ] . parent( ) , 0 ) ;
610618 assert_eq ! ( nodes[ 6 ] . parent( ) , 2 ) ;
611619
612- assert ! ( nodes[ 0 ]
613- . child_l_aabb( )
614- . relative_eq( & shapes[ 2 ] . aabb( ) , f32 :: EPSILON ) ) ;
615- assert ! ( nodes[ 2 ]
616- . child_r_aabb( )
617- . relative_eq( & shapes[ 3 ] . aabb( ) , f32 :: EPSILON ) ) ;
618- assert ! ( nodes[ 1 ]
619- . child_l_aabb( )
620- . relative_eq( & shapes[ 0 ] . aabb( ) , f32 :: EPSILON ) ) ;
621- assert ! ( nodes[ 1 ]
622- . child_r_aabb( )
623- . relative_eq( & shapes[ 1 ] . aabb( ) , f32 :: EPSILON ) ) ;
620+ assert ! (
621+ nodes[ 0 ]
622+ . child_l_aabb( )
623+ . relative_eq( & shapes[ 2 ] . aabb( ) , f32 :: EPSILON )
624+ ) ;
625+ assert ! (
626+ nodes[ 2 ]
627+ . child_r_aabb( )
628+ . relative_eq( & shapes[ 3 ] . aabb( ) , f32 :: EPSILON )
629+ ) ;
630+ assert ! (
631+ nodes[ 1 ]
632+ . child_l_aabb( )
633+ . relative_eq( & shapes[ 0 ] . aabb( ) , f32 :: EPSILON )
634+ ) ;
635+ assert ! (
636+ nodes[ 1 ]
637+ . child_r_aabb( )
638+ . relative_eq( & shapes[ 1 ] . aabb( ) , f32 :: EPSILON )
639+ ) ;
624640 }
625641
626642 #[ test]
@@ -652,8 +668,8 @@ mod tests {
652668#[ cfg( all( feature = "bench" , test) ) ]
653669mod bench {
654670 use crate :: testbase:: {
655- create_n_cubes, default_bounds, intersect_bh, load_sponza_scene, randomly_transform_scene ,
656- TAabb3 , TBvh3 , Triangle ,
671+ TAabb3 , TBvh3 , Triangle , create_n_cubes, default_bounds, intersect_bh, load_sponza_scene,
672+ randomly_transform_scene ,
657673 } ;
658674
659675 #[ bench]
0 commit comments