@@ -6,7 +6,7 @@ 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) . unwrap ( ) ;
9
+ let obj = obj:: read:: parse ( include_object ! ( "data/x86/staticdebug.obj" ) , & diff_config, obj :: DiffSide :: Base ) . unwrap ( ) ;
10
10
insta:: assert_debug_snapshot!( obj) ;
11
11
let symbol_idx = obj. symbols . iter ( ) . position ( |s| s. name == "?PrintThing@@YAXXZ" ) . unwrap ( ) ;
12
12
let diff = diff:: code:: no_diff_code ( & obj, symbol_idx, & diff_config) . unwrap ( ) ;
@@ -23,15 +23,15 @@ fn read_x86_combine_sections() {
23
23
combine_text_sections : true ,
24
24
..Default :: default ( )
25
25
} ;
26
- let obj = obj:: read:: parse ( include_object ! ( "data/x86/rtest.obj" ) , & diff_config) . unwrap ( ) ;
26
+ let obj = obj:: read:: parse ( include_object ! ( "data/x86/rtest.obj" ) , & diff_config, obj :: DiffSide :: Base ) . unwrap ( ) ;
27
27
insta:: assert_debug_snapshot!( obj. sections) ;
28
28
}
29
29
30
30
#[ test]
31
31
#[ cfg( feature = "x86" ) ]
32
32
fn read_x86_64 ( ) {
33
33
let diff_config = diff:: DiffObjConfig :: default ( ) ;
34
- let obj = obj:: read:: parse ( include_object ! ( "data/x86_64/vs2022.o" ) , & diff_config) . unwrap ( ) ;
34
+ let obj = obj:: read:: parse ( include_object ! ( "data/x86_64/vs2022.o" ) , & diff_config, obj :: DiffSide :: Base ) . unwrap ( ) ;
35
35
insta:: assert_debug_snapshot!( obj) ;
36
36
let symbol_idx =
37
37
obj. symbols . iter ( ) . position ( |s| s. name == "?Dot@Vector@@QEAAMPEAU1@@Z" ) . unwrap ( ) ;
@@ -45,7 +45,7 @@ fn read_x86_64() {
45
45
#[ cfg( feature = "x86" ) ]
46
46
fn display_section_ordering ( ) {
47
47
let diff_config = diff:: DiffObjConfig :: default ( ) ;
48
- let obj = obj:: read:: parse ( include_object ! ( "data/x86/basenode.obj" ) , & diff_config) . unwrap ( ) ;
48
+ let obj = obj:: read:: parse ( include_object ! ( "data/x86/basenode.obj" ) , & diff_config, obj :: DiffSide :: Base ) . unwrap ( ) ;
49
49
let obj_diff =
50
50
diff:: diff_objs ( Some ( & obj) , None , None , & diff_config, & diff:: MappingConfig :: default ( ) )
51
51
. unwrap ( )
@@ -60,7 +60,7 @@ fn display_section_ordering() {
60
60
#[ cfg( feature = "x86" ) ]
61
61
fn read_x86_jumptable ( ) {
62
62
let diff_config = diff:: DiffObjConfig :: default ( ) ;
63
- let obj = obj:: read:: parse ( include_object ! ( "data/x86/jumptable.o" ) , & diff_config) . unwrap ( ) ;
63
+ let obj = obj:: read:: parse ( include_object ! ( "data/x86/jumptable.o" ) , & diff_config, obj :: DiffSide :: Base ) . unwrap ( ) ;
64
64
insta:: assert_debug_snapshot!( obj) ;
65
65
let symbol_idx = obj. symbols . iter ( ) . position ( |s| s. name == "?test@@YAHH@Z" ) . unwrap ( ) ;
66
66
let diff = diff:: code:: no_diff_code ( & obj, symbol_idx, & diff_config) . unwrap ( ) ;
@@ -74,6 +74,6 @@ fn read_x86_jumptable() {
74
74
#[ cfg( feature = "x86" ) ]
75
75
fn read_x86_local_labels ( ) {
76
76
let diff_config = diff:: DiffObjConfig :: default ( ) ;
77
- let obj = obj:: read:: parse ( include_object ! ( "data/x86/local_labels.obj" ) , & diff_config) . unwrap ( ) ;
77
+ let obj = obj:: read:: parse ( include_object ! ( "data/x86/local_labels.obj" ) , & diff_config, obj :: DiffSide :: Base ) . unwrap ( ) ;
78
78
insta:: assert_debug_snapshot!( obj) ;
79
79
}
0 commit comments