Rename Tester
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
wp_intern u8 temp_buf[TEMP_BUF_SIZE] = {0};
|
||||
wp_intern Allocator temp_allocator = {0};
|
||||
|
||||
TestFuncResult test_arena_allocator(void) {
|
||||
WpTestFuncResult test_arena_allocator(void) {
|
||||
Allocator allocator = wapp_mem_arena_allocator_init(4096);
|
||||
b8 result = allocator.obj != NULL && allocator.alloc != NULL &&
|
||||
allocator.alloc_aligned != NULL &&
|
||||
@@ -20,10 +20,10 @@ TestFuncResult test_arena_allocator(void) {
|
||||
|
||||
wapp_mem_arena_allocator_destroy(&allocator);
|
||||
|
||||
return wapp_tester_result(result);
|
||||
return wpTesterResult(result);
|
||||
}
|
||||
|
||||
TestFuncResult test_arena_allocator_with_buffer(void) {
|
||||
WpTestFuncResult test_arena_allocator_with_buffer(void) {
|
||||
u8 buffer[KiB(4)] = {0};
|
||||
|
||||
Allocator allocator = wapp_mem_arena_allocator_init_with_buffer(buffer, KiB(4));
|
||||
@@ -36,10 +36,10 @@ TestFuncResult test_arena_allocator_with_buffer(void) {
|
||||
|
||||
wapp_mem_arena_allocator_destroy(&allocator);
|
||||
|
||||
return wapp_tester_result(result);
|
||||
return wpTesterResult(result);
|
||||
}
|
||||
|
||||
TestFuncResult test_arena_allocator_temp_begin(void) {
|
||||
WpTestFuncResult test_arena_allocator_temp_begin(void) {
|
||||
temp_allocator = wapp_mem_arena_allocator_init_with_buffer(temp_buf, TEMP_BUF_SIZE);
|
||||
|
||||
i32 *num1 = (i32 *)wapp_mem_allocator_alloc(&temp_allocator, sizeof(i32));
|
||||
@@ -51,10 +51,10 @@ TestFuncResult test_arena_allocator_temp_begin(void) {
|
||||
i32 *num3 = (i32 *)wapp_mem_allocator_alloc(&temp_allocator, sizeof(i32));
|
||||
result = result && num3 == NULL;
|
||||
|
||||
return wapp_tester_result(result);
|
||||
return wpTesterResult(result);
|
||||
}
|
||||
|
||||
TestFuncResult test_arena_allocator_temp_end(void) {
|
||||
WpTestFuncResult test_arena_allocator_temp_end(void) {
|
||||
wapp_mem_arena_allocator_temp_end(&temp_allocator);
|
||||
i32 *num1 = (i32 *)wapp_mem_allocator_alloc(&temp_allocator, sizeof(i32));
|
||||
b8 result = num1 != NULL;
|
||||
@@ -63,5 +63,5 @@ TestFuncResult test_arena_allocator_temp_end(void) {
|
||||
|
||||
wapp_mem_arena_allocator_destroy(&temp_allocator);
|
||||
|
||||
return wapp_tester_result(result);
|
||||
return wpTesterResult(result);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
wp_intern u8 temp_buf[TEMP_BUF_SIZE] = {};
|
||||
wp_intern Allocator temp_allocator = {};
|
||||
|
||||
TestFuncResult test_arena_allocator(void) {
|
||||
WpTestFuncResult test_arena_allocator(void) {
|
||||
Allocator allocator = wapp_mem_arena_allocator_init(4096);
|
||||
b8 result = allocator.obj != nullptr && allocator.alloc != nullptr &&
|
||||
allocator.alloc_aligned != nullptr &&
|
||||
@@ -20,10 +20,10 @@ TestFuncResult test_arena_allocator(void) {
|
||||
|
||||
wapp_mem_arena_allocator_destroy(&allocator);
|
||||
|
||||
return wapp_tester_result(result);
|
||||
return wpTesterResult(result);
|
||||
}
|
||||
|
||||
TestFuncResult test_arena_allocator_with_buffer(void) {
|
||||
WpTestFuncResult test_arena_allocator_with_buffer(void) {
|
||||
u8 buffer[KiB(4)] = {0};
|
||||
|
||||
Allocator allocator = wapp_mem_arena_allocator_init_with_buffer(buffer, KiB(4));
|
||||
@@ -36,10 +36,10 @@ TestFuncResult test_arena_allocator_with_buffer(void) {
|
||||
|
||||
wapp_mem_arena_allocator_destroy(&allocator);
|
||||
|
||||
return wapp_tester_result(result);
|
||||
return wpTesterResult(result);
|
||||
}
|
||||
|
||||
TestFuncResult test_arena_allocator_temp_begin(void) {
|
||||
WpTestFuncResult test_arena_allocator_temp_begin(void) {
|
||||
temp_allocator = wapp_mem_arena_allocator_init_with_buffer(temp_buf, TEMP_BUF_SIZE);
|
||||
|
||||
i32 *num1 = (i32 *)wapp_mem_allocator_alloc(&temp_allocator, sizeof(i32));
|
||||
@@ -51,10 +51,10 @@ TestFuncResult test_arena_allocator_temp_begin(void) {
|
||||
i32 *num3 = (i32 *)wapp_mem_allocator_alloc(&temp_allocator, sizeof(i32));
|
||||
result = result && num3 == NULL;
|
||||
|
||||
return wapp_tester_result(result);
|
||||
return wpTesterResult(result);
|
||||
}
|
||||
|
||||
TestFuncResult test_arena_allocator_temp_end(void) {
|
||||
WpTestFuncResult test_arena_allocator_temp_end(void) {
|
||||
wapp_mem_arena_allocator_temp_end(&temp_allocator);
|
||||
i32 *num1 = (i32 *)wapp_mem_allocator_alloc(&temp_allocator, sizeof(i32));
|
||||
b8 result = num1 != NULL;
|
||||
@@ -63,5 +63,5 @@ TestFuncResult test_arena_allocator_temp_end(void) {
|
||||
|
||||
wapp_mem_arena_allocator_destroy(&temp_allocator);
|
||||
|
||||
return wapp_tester_result(result);
|
||||
return wpTesterResult(result);
|
||||
}
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
#include "wapp.h"
|
||||
|
||||
TestFuncResult test_arena_allocator(void);
|
||||
TestFuncResult test_arena_allocator_with_buffer(void);
|
||||
TestFuncResult test_arena_allocator_temp_begin(void);
|
||||
TestFuncResult test_arena_allocator_temp_end(void);
|
||||
WpTestFuncResult test_arena_allocator(void);
|
||||
WpTestFuncResult test_arena_allocator_with_buffer(void);
|
||||
WpTestFuncResult test_arena_allocator_temp_begin(void);
|
||||
WpTestFuncResult test_arena_allocator_temp_end(void);
|
||||
|
||||
#endif // !TEST_ALLOCATOR_H
|
||||
|
||||
Reference in New Issue
Block a user