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

Function read_x86_jumptable

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

Source from the content-addressed store, hash-verified

76#[test]
77#[cfg(feature = "x86")]
78fn read_x86_jumptable() {
79 let diff_config = diff::DiffObjConfig::default();
80 let obj = obj::read::parse(
81 include_object!("data/x86/jumptable.o"),
82 &diff_config,
83 diff::DiffSide::Base,
84 )
85 .unwrap();
86 insta::assert_debug_snapshot!(obj);
87 let symbol_idx = obj.symbols.iter().position(|s| s.name == "?test@@YAHH@Z").unwrap();
88 let diff = diff::code::no_diff_code(&obj, symbol_idx, &diff_config).unwrap();
89 insta::assert_debug_snapshot!(diff.instruction_rows);
90 let output = common::display_diff(&obj, &diff, symbol_idx, &diff_config);
91 insta::assert_snapshot!(output);
92}
93
94// Inferred size of functions should ignore symbols with specific prefixes
95#[test]

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