This commit is contained in:
2025-10-03 20:55:18 +02:00
parent 5fed6d24d8
commit 8ada613a3e
3 changed files with 34 additions and 34 deletions
+7 -7
View File
@@ -3,12 +3,12 @@
#include "allocator.h"
Test(std_allocator, test) {
allocator_t this = allocator_stdlib;
void *ptr = allocator_alloc(this, 10);
cr_assert(ptr != ((void *)0), "non null from malloc");
void *new_ptr = allocator_resize(this, ptr, 1024*1024*500);
cr_assert(new_ptr != ((void *)0), "non null from realloc");
cr_assert(new_ptr != ptr, "realloc is not the same ptr as malloc");
allocator_t this = allocator_stdlib;
void *ptr = allocator_alloc(this, 10);
cr_assert(ptr != ((void *)0), "non null from malloc");
void *new_ptr = allocator_resize(this, ptr, 1024*1024*500);
cr_assert(new_ptr != ((void *)0), "non null from realloc");
cr_assert(new_ptr != ptr, "realloc is not the same ptr as malloc");
allocator_free(this, new_ptr);
allocator_free(this, new_ptr);
}