Add padding to arena and test_func_result structs
This commit is contained in:
parent
a0acada9b4
commit
cd78913e83
@ -1,6 +1,7 @@
|
|||||||
#include "mem_arena.h"
|
#include "mem_arena.h"
|
||||||
#include "aliases.h"
|
#include "aliases.h"
|
||||||
#include "mem_utils.h"
|
#include "mem_utils.h"
|
||||||
|
#include "misc_utils.h"
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -18,6 +19,10 @@ struct arena {
|
|||||||
u8 *offset;
|
u8 *offset;
|
||||||
u64 capacity;
|
u64 capacity;
|
||||||
bool committed;
|
bool committed;
|
||||||
|
|
||||||
|
#ifdef WAPP_PLATFORM_WINDOWS
|
||||||
|
wapp_misc_utils_padding_size(sizeof(u8 *) * 2 + sizeof(u64) + sizeof(bool));
|
||||||
|
#endif // ifdef WAPP_PLATFORM_WINDOWS
|
||||||
};
|
};
|
||||||
|
|
||||||
// PUBLIC API
|
// PUBLIC API
|
||||||
|
@ -1,20 +1,26 @@
|
|||||||
#ifndef TESTER_H
|
#ifndef TESTER_H
|
||||||
#define TESTER_H
|
#define TESTER_H
|
||||||
|
|
||||||
|
#include "misc_utils.h"
|
||||||
|
#include "platform.h"
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
|
||||||
#define wapp_tester_result(test_passed) \
|
#define wapp_tester_result(PASSED) \
|
||||||
((TestFuncResult){.name = __func__, .passed = test_passed})
|
((TestFuncResult){.name = __func__, .passed = PASSED})
|
||||||
#define wapp_tester_run_tests(...) run_tests(__VA_ARGS__, NULL)
|
#define wapp_tester_run_tests(...) run_tests(__VA_ARGS__, NULL)
|
||||||
|
|
||||||
typedef struct test_func_result TestFuncResult;
|
typedef struct test_func_result TestFuncResult;
|
||||||
struct test_func_result {
|
struct test_func_result {
|
||||||
const char *name;
|
const char *name;
|
||||||
bool passed;
|
bool passed;
|
||||||
|
|
||||||
|
#ifdef WAPP_PLATFORM_WINDOWS
|
||||||
|
wapp_misc_utils_padding_size(sizeof(const char *) + sizeof(bool));
|
||||||
|
#endif // WAPP_PLATFORM_WINDOWS
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef TestFuncResult(TestFunc)(void);
|
typedef TestFuncResult(TestFunc)(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user