Improve testing framework
Replaced Criterrion with CMock. Added few tests, currently not working properly. Random test upgrades.
This commit is contained in:
1 parent
56c0b7922f
commit
f5ab5f3f27
29 files changed
+140082
-310
No files matched your search
+12
-2
@@ -19,13 +19,23 @@
|
||||
* @brief Macro for allocating memory and checking it on the same line
|
||||
*
|
||||
*/
|
||||
#ifndef RSE_TEST
|
||||
#define rse_malloc(ptr, size) \
|
||||
ptr = malloc(size); \
|
||||
if (ptr == NULL) { \
|
||||
LOGF(common_messages[COMMON_ERROR_MEMORY_ALLOCATION_FAILED]); \
|
||||
return RSE_COMMON_ERROR_MALLLOC_FAILED; \
|
||||
LOGF(common_messages[COMMON_ERROR_MEMORY_ALLOCATION_FAILED]); \
|
||||
exit(1); \
|
||||
}
|
||||
|
||||
#define rse_free(ptr) free(ptr);
|
||||
|
||||
#define rse_memcpy(dst, src, size) memcpy(dst, src, size);
|
||||
#else
|
||||
#define rse_malloc(ptr, size) ptr = NULL;
|
||||
#define rse_free(ptr)
|
||||
#define rse_memcpy(dst, src, size)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Error type for RSE
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user