Skip to content

Commit 6244f18

Browse files
committed
[Rust] Check lifted call for params and output in mlil test
1 parent 329d4ee commit 6244f18

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

rust/tests/medium_level_il.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use binaryninja::binary_view::BinaryViewExt;
22
use binaryninja::headless::Session;
3-
use binaryninja::medium_level_il::{MediumLevelILInstructionKind, MediumLevelInstructionIndex};
3+
use binaryninja::medium_level_il::{MediumLevelILInstructionKind, MediumLevelILLiftedInstructionKind, MediumLevelInstructionIndex};
44
use std::path::PathBuf;
55

66
#[test]
@@ -68,6 +68,14 @@ fn test_mlil_info() {
6868
}
6969
_ => panic!("Expected Call"),
7070
}
71+
match instr_3.lift().kind {
72+
MediumLevelILLiftedInstructionKind::Call(lifted_call) => {
73+
assert_eq!(lifted_call.dest.index, MediumLevelInstructionIndex(7));
74+
assert_eq!(lifted_call.output.len(), 1);
75+
assert_eq!(lifted_call.params.len(), 1);
76+
}
77+
_ => panic!("Expected Call"),
78+
}
7179
// 4 @ 00025f22 (MLIL_RET return (MLIL_VAR.d eax_1))
7280
let instr_4 = mlil_instr_iter.next().unwrap();
7381
assert_eq!(instr_4.expr_index, MediumLevelInstructionIndex(13));

0 commit comments

Comments
 (0)