@@ -6,7 +6,12 @@ mod common;
6
6
#[ cfg( feature = "x86" ) ]
7
7
fn read_x86 ( ) {
8
8
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 ( ) ;
10
15
insta:: assert_debug_snapshot!( obj) ;
11
16
let symbol_idx = obj. symbols . iter ( ) . position ( |s| s. name == "?PrintThing@@YAXXZ" ) . unwrap ( ) ;
12
17
let diff = diff:: code:: no_diff_code ( & obj, symbol_idx, & diff_config) . unwrap ( ) ;
@@ -23,15 +28,22 @@ fn read_x86_combine_sections() {
23
28
combine_text_sections : true ,
24
29
..Default :: default ( )
25
30
} ;
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 ( ) ;
27
34
insta:: assert_debug_snapshot!( obj. sections) ;
28
35
}
29
36
30
37
#[ test]
31
38
#[ cfg( feature = "x86" ) ]
32
39
fn read_x86_64 ( ) {
33
40
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 ( ) ;
35
47
insta:: assert_debug_snapshot!( obj) ;
36
48
let symbol_idx =
37
49
obj. symbols . iter ( ) . position ( |s| s. name == "?Dot@Vector@@QEAAMPEAU1@@Z" ) . unwrap ( ) ;
@@ -45,7 +57,12 @@ fn read_x86_64() {
45
57
#[ cfg( feature = "x86" ) ]
46
58
fn display_section_ordering ( ) {
47
59
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 ( ) ;
49
66
let obj_diff =
50
67
diff:: diff_objs ( Some ( & obj) , None , None , & diff_config, & diff:: MappingConfig :: default ( ) )
51
68
. unwrap ( )
@@ -60,7 +77,12 @@ fn display_section_ordering() {
60
77
#[ cfg( feature = "x86" ) ]
61
78
fn read_x86_jumptable ( ) {
62
79
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 ( ) ;
64
86
insta:: assert_debug_snapshot!( obj) ;
65
87
let symbol_idx = obj. symbols . iter ( ) . position ( |s| s. name == "?test@@YAHH@Z" ) . unwrap ( ) ;
66
88
let diff = diff:: code:: no_diff_code ( & obj, symbol_idx, & diff_config) . unwrap ( ) ;
@@ -74,6 +96,11 @@ fn read_x86_jumptable() {
74
96
#[ cfg( feature = "x86" ) ]
75
97
fn read_x86_local_labels ( ) {
76
98
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 ( ) ;
78
105
insta:: assert_debug_snapshot!( obj) ;
79
106
}
0 commit comments