2016-06-16 08:31:04 -04:00
|
|
|
#ifndef __TESTS_H
|
|
|
|
|
#define __TESTS_H
|
|
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
#include <setjmp.h>
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
#include <cmocka.h>
|
|
|
|
|
|
2016-06-19 11:25:58 -04: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 12:06:16 -04:00
|
|
|
int malloc_calls();
|
|
|
|
|
int free_calls();
|
|
|
|
|
int calloc_calls();
|
|
|
|
|
int realloc_calls();
|
|
|
|
|
int alloc_calls();
|
2016-06-19 11:25:58 -04:00
|
|
|
|
2016-06-16 08:31:04 -04:00
|
|
|
#endif
|