diff options
| author | Mason Reed <mason@vector35.com> | 2025-05-11 16:16:11 -0400 |
|---|---|---|
| committer | Mason Reed <35282038+emesare@users.noreply.github.com> | 2025-05-12 17:45:24 -0400 |
| commit | c4da4396109b98971686154dbb305b281cd3e872 (patch) | |
| tree | 9cbb84b25a4f40d57c168af3d515353f959ebe31 /rust | |
| parent | ff406c03609896c0e764bf2ae5575a4c20538aab (diff) | |
[Rust] Check lifted call for params and output in mlil test
Diffstat (limited to 'rust')
| -rw-r--r-- | rust/tests/medium_level_il.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/rust/tests/medium_level_il.rs b/rust/tests/medium_level_il.rs index 544076cc..7f73cde3 100644 --- a/rust/tests/medium_level_il.rs +++ b/rust/tests/medium_level_il.rs @@ -1,6 +1,6 @@ use binaryninja::binary_view::BinaryViewExt; use binaryninja::headless::Session; -use binaryninja::medium_level_il::{MediumLevelILInstructionKind, MediumLevelInstructionIndex}; +use binaryninja::medium_level_il::{MediumLevelILInstructionKind, MediumLevelILLiftedInstructionKind, MediumLevelInstructionIndex}; use std::path::PathBuf; #[test] @@ -68,6 +68,14 @@ fn test_mlil_info() { } _ => panic!("Expected Call"), } + match instr_3.lift().kind { + MediumLevelILLiftedInstructionKind::Call(lifted_call) => { + assert_eq!(lifted_call.dest.index, MediumLevelInstructionIndex(7)); + assert_eq!(lifted_call.output.len(), 1); + assert_eq!(lifted_call.params.len(), 1); + } + _ => panic!("Expected Call"), + } // 4 @ 00025f22 (MLIL_RET return (MLIL_VAR.d eax_1)) let instr_4 = mlil_instr_iter.next().unwrap(); assert_eq!(instr_4.expr_index, MediumLevelInstructionIndex(13)); |
