-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for rename macros. (#2202)
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
/* Capstone Disassembler Engine */ | ||
/* By Nguyen Anh Quynh <[email protected]>, 2013-2019 */ | ||
|
||
#include <assert.h> | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
|
||
|
@@ -222,9 +223,27 @@ static void test() | |
} | ||
} | ||
|
||
void test_macros() { | ||
assert(CS_AARCH64(_INS_BL) == ARM64_INS_BL); | ||
assert(CS_AARCH64pre(CS_ARCH_) == CS_ARCH_ARM64); | ||
assert(CS_AARCH64CC(_AL) == ARM64_CC_AL); | ||
assert(CS_AARCH64_VL_(16B) == ARM64_VAS_16B); | ||
cs_detail detail = { 0 }; | ||
CS_cs_aarch64() arm64_detail = { 0 }; | ||
detail.arm64 = arm64_detail; | ||
CS_aarch64_op() op = { 0 }; | ||
detail.CS_aarch64().operands[0] = op; | ||
CS_aarch64_reg() reg = 1; | ||
CS_aarch64_cc() cc = ARM64_CC_AL; | ||
CS_aarch64_extender() arm64_extender = ARM64_EXT_SXTB; | ||
CS_aarch64_shifter() arm64_shifter = ARM64_SFT_LSL; | ||
CS_aarch64_vas() arm64_vas = ARM64_VAS_16B; | ||
} | ||
|
||
int main() | ||
{ | ||
test(); | ||
test_macros(); | ||
|
||
return 0; | ||
} | ||
|