added mock_assertions macro, might not function idk
This commit is contained in:
parent
875ad2f30a
commit
755f8a96a2
|
@ -22,6 +22,14 @@ extern void _test_free(void* const ptr, const char* file, const int line);
|
|||
#define malloc(size) _test_malloc(size, __FILE__, __LINE__)
|
||||
#define calloc(num, size) _test_calloc(num, size, __FILE__, __LINE__)
|
||||
#define free(ptr) _test_free(ptr, __FILE__, __LINE__)
|
||||
|
||||
/*Mock assertions: redefines assert() calls*/
|
||||
extern void mock_assert(const int result, const char* const expression,
|
||||
const char * const file, const int line);
|
||||
#undef assert
|
||||
#define assert(expression) \
|
||||
mock_assert((int)(expression), #expression, __FILE__, __LINE__);
|
||||
|
||||
#endif // UNIT_TESTING
|
||||
|
||||
#define NUM_ACCEL_REGS 6
|
||||
|
@ -324,6 +332,7 @@ struct ft_vals self_test_ft_calculation(struct gy521_module* m)
|
|||
/*Self Test register functions*/
|
||||
self_test_results gy521_self_test(struct gy521_module* m)
|
||||
{
|
||||
|
||||
/*0. Enable self test*/
|
||||
enable_self_test_gyro(m);
|
||||
|
||||
|
|
Loading…
Reference in New Issue