unicorn/test/unit/test_mem_map.c

36 lines
609 B
C
Raw Normal View History

2015-09-07 22:05:55 +03:00
#include "unicorn_test.h"
#include <stdio.h>
static int setup(void **state)
{
fprintf(stderr, "~~~ setup() ~~~\n");
uc_engine *uc;
uc_assert_success(uc_open(UC_ARCH_X86, UC_MODE_32, &uc));
*state = uc;
return 0;
}
static int teardown(void **state)
{
uc_engine *uc = *state;
fprintf(stderr, "~~~ teardown() ~~~\n");
uc_assert_success(uc_close(uc));
return 0;
}
static void test_basic(void **state)
{
}
int main(void) {
const struct CMUnitTest tests[] = {
cmocka_unit_test(test_basic),
};
return cmocka_run_group_tests(tests, setup, teardown);
}