From c4da4396109b98971686154dbb305b281cd3e872 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Sun, 11 May 2025 16:16:11 -0400 Subject: [Rust] Check lifted call for params and output in mlil test --- rust/tests/medium_level_il.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'rust') 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)); -- cgit v1.3.1