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

Function read_thumb

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

Source from the content-addressed store, hash-verified

24#[test]
25#[cfg(feature = "arm")]
26fn read_thumb() {
27 let diff_config = diff::DiffObjConfig { ..Default::default() };
28 let obj =
29 obj::read::parse(include_object!("data/arm/thumb.o"), &diff_config, diff::DiffSide::Base)
30 .unwrap();
31 insta::assert_debug_snapshot!(obj);
32 let symbol_idx = obj
33 .symbols
34 .iter()
35 .position(|s| s.name == "THUMB_BRANCH_ServerDisplay_UncategorizedMove")
36 .unwrap();
37 let diff = diff::code::no_diff_code(&obj, symbol_idx, &diff_config).unwrap();
38 insta::assert_debug_snapshot!(diff.instruction_rows);
39 let output = common::display_diff(&obj, &diff, symbol_idx, &diff_config);
40 insta::assert_snapshot!(output);
41}
42
43#[test]
44#[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