@@ -6,7 +6,12 @@ mod common;
66#[ cfg( feature = "x86" ) ]
77fn read_x86 ( ) {
88 let diff_config = diff:: DiffObjConfig :: default ( ) ;
9- let obj = obj:: read:: parse ( include_object ! ( "data/x86/staticdebug.obj" ) , & diff_config, obj:: DiffSide :: Base ) . unwrap ( ) ;
9+ let obj = obj:: read:: parse (
10+ include_object ! ( "data/x86/staticdebug.obj" ) ,
11+ & diff_config,
12+ obj:: DiffSide :: Base ,
13+ )
14+ . unwrap ( ) ;
1015 insta:: assert_debug_snapshot!( obj) ;
1116 let symbol_idx = obj. symbols . iter ( ) . position ( |s| s. name == "?PrintThing@@YAXXZ" ) . unwrap ( ) ;
1217 let diff = diff:: code:: no_diff_code ( & obj, symbol_idx, & diff_config) . unwrap ( ) ;
@@ -23,15 +28,22 @@ fn read_x86_combine_sections() {
2328 combine_text_sections : true ,
2429 ..Default :: default ( )
2530 } ;
26- let obj = obj:: read:: parse ( include_object ! ( "data/x86/rtest.obj" ) , & diff_config, obj:: DiffSide :: Base ) . unwrap ( ) ;
31+ let obj =
32+ obj:: read:: parse ( include_object ! ( "data/x86/rtest.obj" ) , & diff_config, obj:: DiffSide :: Base )
33+ . unwrap ( ) ;
2734 insta:: assert_debug_snapshot!( obj. sections) ;
2835}
2936
3037#[ test]
3138#[ cfg( feature = "x86" ) ]
3239fn read_x86_64 ( ) {
3340 let diff_config = diff:: DiffObjConfig :: default ( ) ;
34- let obj = obj:: read:: parse ( include_object ! ( "data/x86_64/vs2022.o" ) , & diff_config, obj:: DiffSide :: Base ) . unwrap ( ) ;
41+ let obj = obj:: read:: parse (
42+ include_object ! ( "data/x86_64/vs2022.o" ) ,
43+ & diff_config,
44+ obj:: DiffSide :: Base ,
45+ )
46+ . unwrap ( ) ;
3547 insta:: assert_debug_snapshot!( obj) ;
3648 let symbol_idx =
3749 obj. symbols . iter ( ) . position ( |s| s. name == "?Dot@Vector@@QEAAMPEAU1@@Z" ) . unwrap ( ) ;
@@ -45,7 +57,12 @@ fn read_x86_64() {
4557#[ cfg( feature = "x86" ) ]
4658fn display_section_ordering ( ) {
4759 let diff_config = diff:: DiffObjConfig :: default ( ) ;
48- let obj = obj:: read:: parse ( include_object ! ( "data/x86/basenode.obj" ) , & diff_config, obj:: DiffSide :: Base ) . unwrap ( ) ;
60+ let obj = obj:: read:: parse (
61+ include_object ! ( "data/x86/basenode.obj" ) ,
62+ & diff_config,
63+ obj:: DiffSide :: Base ,
64+ )
65+ . unwrap ( ) ;
4966 let obj_diff =
5067 diff:: diff_objs ( Some ( & obj) , None , None , & diff_config, & diff:: MappingConfig :: default ( ) )
5168 . unwrap ( )
@@ -60,7 +77,12 @@ fn display_section_ordering() {
6077#[ cfg( feature = "x86" ) ]
6178fn read_x86_jumptable ( ) {
6279 let diff_config = diff:: DiffObjConfig :: default ( ) ;
63- let obj = obj:: read:: parse ( include_object ! ( "data/x86/jumptable.o" ) , & diff_config, obj:: DiffSide :: Base ) . unwrap ( ) ;
80+ let obj = obj:: read:: parse (
81+ include_object ! ( "data/x86/jumptable.o" ) ,
82+ & diff_config,
83+ obj:: DiffSide :: Base ,
84+ )
85+ . unwrap ( ) ;
6486 insta:: assert_debug_snapshot!( obj) ;
6587 let symbol_idx = obj. symbols . iter ( ) . position ( |s| s. name == "?test@@YAHH@Z" ) . unwrap ( ) ;
6688 let diff = diff:: code:: no_diff_code ( & obj, symbol_idx, & diff_config) . unwrap ( ) ;
@@ -74,6 +96,11 @@ fn read_x86_jumptable() {
7496#[ cfg( feature = "x86" ) ]
7597fn read_x86_local_labels ( ) {
7698 let diff_config = diff:: DiffObjConfig :: default ( ) ;
77- let obj = obj:: read:: parse ( include_object ! ( "data/x86/local_labels.obj" ) , & diff_config, obj:: DiffSide :: Base ) . unwrap ( ) ;
99+ let obj = obj:: read:: parse (
100+ include_object ! ( "data/x86/local_labels.obj" ) ,
101+ & diff_config,
102+ obj:: DiffSide :: Base ,
103+ )
104+ . unwrap ( ) ;
78105 insta:: assert_debug_snapshot!( obj) ;
79106}
0 commit comments