MCPcopy Index your code
hub / github.com/encounter/objdiff / read_arm

Function read_arm

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

Source from the content-addressed store, hash-verified

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

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