Add padding to arena and test_func_result structs

This commit is contained in:
2024-06-09 17:40:41 +01:00
parent a0acada9b4
commit cd78913e83
2 changed files with 13 additions and 2 deletions

View File

@@ -1,20 +1,26 @@
#ifndef TESTER_H
#define TESTER_H
#include "misc_utils.h"
#include "platform.h"
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
#define wapp_tester_result(test_passed) \
((TestFuncResult){.name = __func__, .passed = test_passed})
#define wapp_tester_result(PASSED) \
((TestFuncResult){.name = __func__, .passed = PASSED})
#define wapp_tester_run_tests(...) run_tests(__VA_ARGS__, NULL)
typedef struct test_func_result TestFuncResult;
struct test_func_result {
const char *name;
bool passed;
#ifdef WAPP_PLATFORM_WINDOWS
wapp_misc_utils_padding_size(sizeof(const char *) + sizeof(bool));
#endif // WAPP_PLATFORM_WINDOWS
};
typedef TestFuncResult(TestFunc)(void);