Skip to content

Commit eedd9fe

Browse files
committed
rs: add previously failed testcase from issue 175
1 parent 33a8064 commit eedd9fe

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

capstone-rs/src/test.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4161,3 +4161,24 @@ fn test_regs_tms320c64x() {
41614161
CsResult::Err(Error::UnsupportedArch),
41624162
);
41634163
}
4164+
4165+
// regression tests
4166+
#[cfg(feature = "arch_aarch64")]
4167+
#[test]
4168+
fn test_issue_175() {
4169+
let cs = Capstone::new()
4170+
.aarch64()
4171+
.detail(true)
4172+
.mode(aarch64::ArchMode::Arm)
4173+
.build()
4174+
.unwrap();
4175+
4176+
let insns = cs.disasm_all(&[0x0c, 0x44, 0x3b, 0xd5], 0).unwrap();
4177+
for i in insns.as_ref() {
4178+
let id = cs.insn_detail(&i).unwrap();
4179+
let ad = id.arch_detail();
4180+
let aarch = ad.aarch64().unwrap();
4181+
4182+
println!("{i} (dt: {:?})", aarch.operands().collect::<Vec<_>>());
4183+
}
4184+
}

0 commit comments

Comments
 (0)