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

Function read_x86_64

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

Source from the content-addressed store, hash-verified

37#[test]
38#[cfg(feature = "x86")]
39fn read_x86_64() {
40 let diff_config = diff::DiffObjConfig::default();
41 let obj = obj::read::parse(
42 include_object!("data/x86_64/vs2022.o"),
43 &diff_config,
44 diff::DiffSide::Base,
45 )
46 .unwrap();
47 insta::assert_debug_snapshot!(obj);
48 let symbol_idx =
49 obj.symbols.iter().position(|s| s.name == "?Dot@Vector@@QEAAMPEAU1@@Z").unwrap();
50 let diff = diff::code::no_diff_code(&obj, symbol_idx, &diff_config).unwrap();
51 insta::assert_debug_snapshot!(diff.instruction_rows);
52 let output = common::display_diff(&obj, &diff, symbol_idx, &diff_config);
53 insta::assert_snapshot!(output);
54}
55
56#[test]
57#[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