MCPcopy Create free account
hub / github.com/encounter/objdiff / read_x86

Function read_x86

objdiff-core/tests/arch_x86.rs:7–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5#[test]
6#[cfg(feature = "x86")]
7fn read_x86() {
8 let diff_config = diff::DiffObjConfig::default();
9 let obj = obj::read::parse(
10 include_object!("data/x86/staticdebug.obj"),
11 &diff_config,
12 diff::DiffSide::Base,
13 )
14 .unwrap();
15 insta::assert_debug_snapshot!(obj);
16 let symbol_idx = obj.symbols.iter().position(|s| s.name == "?PrintThing@@YAXXZ").unwrap();
17 let diff = diff::code::no_diff_code(&obj, symbol_idx, &diff_config).unwrap();
18 insta::assert_debug_snapshot!(diff.instruction_rows);
19 let output = common::display_diff(&obj, &diff, symbol_idx, &diff_config);
20 insta::assert_snapshot!(output);
21}
22
23#[test]
24#[cfg(feature = "x86")]

Callers

nothing calls this directly

Calls 3

parseFunction · 0.85
no_diff_codeFunction · 0.85
display_diffFunction · 0.85

Tested by

no test coverage detected