mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-13 02:28:09 +00:00
add assert_ptr_equal fallback
This commit is contained in:
@ -4,6 +4,14 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <cmocka.h>
|
#include <cmocka.h>
|
||||||
|
|
||||||
|
/* Apparently not supported in very old cmocka versions */
|
||||||
|
#ifndef assert_ptr_equal
|
||||||
|
#define assert_ptr_equal(a, b) \
|
||||||
|
_assert_int_equal(cast_ptr_to_largest_integral_type(a), \
|
||||||
|
cast_ptr_to_largest_integral_type(b), \
|
||||||
|
__FILE__, __LINE__)
|
||||||
|
#endif
|
||||||
|
|
||||||
extern void mock_assert(const int result, const char* const expression,
|
extern void mock_assert(const int result, const char* const expression,
|
||||||
const char * const file, const int line);
|
const char * const file, const int line);
|
||||||
#undef assert
|
#undef assert
|
||||||
|
Reference in New Issue
Block a user