2016-06-16 12:31:04 +00:00
|
|
|
#ifndef __TESTS_H
|
|
|
|
#define __TESTS_H
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <setjmp.h>
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <cmocka.h>
|
|
|
|
|
2016-06-19 15:25:58 +00:00
|
|
|
enum wrapper_behavior {
|
|
|
|
WRAPPER_INVOKE_REAL,
|
|
|
|
WRAPPER_INVOKE_CMOCKA,
|
|
|
|
WRAPPER_DO_ASSERTIONS,
|
|
|
|
};
|
|
|
|
|
|
|
|
int reset_mem_wrappers(void **state);
|
|
|
|
void memory_behavior(enum wrapper_behavior behavior);
|
2016-06-19 16:06:16 +00:00
|
|
|
int malloc_calls();
|
|
|
|
int free_calls();
|
|
|
|
int calloc_calls();
|
|
|
|
int realloc_calls();
|
|
|
|
int alloc_calls();
|
2016-06-19 15:25:58 +00:00
|
|
|
|
2016-06-16 12:31:04 +00:00
|
|
|
#endif
|