Improve testing framework

Replaced Criterrion with CMock. Added few tests, currently not working
properly. Random test upgrades.
This commit is contained in:
Piotr Krygier committed 2025-06-20 13:44:33 +02:00
1 parent 56c0b7922f
commit f5ab5f3f27
29 files changed
+140082 -310

No files matched your search

+2 -6
View File
@@ -12,16 +12,11 @@
#ifndef RSE_LOGGER_H
#define RSE_LOGGER_H
#ifndef LOG_LEVEL
#define LOG_LEVEL LOGLEVEL_DEBUG
#endif
#include <stdio.h>
#include <string.h>
#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
#define LOGGER(log_level, ...) _log_log(log_level, __FILENAME__, __LINE__, __VA_ARGS__)
// #define LOGGER(log_level, ...) printf("[##log_level] %s:%d", __FILE__, __LINE__); printf(__VA_ARGS__)
#define LOGT(...) LOGGER(LOGLEVEL_TRACE, __VA_ARGS__)
#define LOGD(...) LOGGER(LOGLEVEL_DEBUG, __VA_ARGS__)
@@ -41,7 +36,8 @@ enum log_level_t
LOGLEVEL_INFO,
LOGLEVEL_WARNING,
LOGLEVEL_ERROR,
LOGLEVEL_FATAL
LOGLEVEL_FATAL,
LOGLEVEL_NONE
};
void _log_log(unsigned int level, const char* file, int line, const char* fmt, ...);