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

Function read_mips

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

Source from the content-addressed store, hash-verified

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

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