Expand data size utilities

This commit is contained in:
2025-12-24 08:53:12 +00:00
parent 3904b3a1ee
commit a065dfb573
12 changed files with 52 additions and 43 deletions

View File

@@ -145,7 +145,7 @@ TestFuncResult test_i32_array_copy_capped(void) {
TestFuncResult test_i32_array_alloc_capacity(void) {
b8 result;
Allocator allocator = wapp_mem_arena_allocator_init(MB(4));
Allocator allocator = wapp_mem_arena_allocator_init(MiB(4));
u64 capacity = 32;
I32Array *array = wapp_array_alloc_capacity(i32, I32Array, &allocator, capacity);
@@ -159,7 +159,7 @@ TestFuncResult test_i32_array_alloc_capacity(void) {
TestFuncResult test_i32_array_append_alloc(void) {
b8 result;
Allocator allocator = wapp_mem_arena_allocator_init(MB(4));
Allocator allocator = wapp_mem_arena_allocator_init(MiB(4));
I32Array array1 = wapp_array(i32, I32Array, 1, 2, 3, 4, 5, 6, 7, 8);
I32Array array2 = wapp_array(i32, I32Array, 1, 2);
@@ -186,7 +186,7 @@ TestFuncResult test_i32_array_append_alloc(void) {
TestFuncResult test_i32_array_extend_alloc(void) {
b8 result;
Allocator allocator = wapp_mem_arena_allocator_init(MB(4));
Allocator allocator = wapp_mem_arena_allocator_init(MiB(4));
I32Array array1 = wapp_array(i32, I32Array, 1, 2, 3, 4, 5, 6, 7, 8);
I32Array array2 = wapp_array(i32, I32Array, 1, 2);
I32Array array3 = wapp_array(i32, I32Array, 1, 2, 3, 4);
@@ -205,7 +205,7 @@ TestFuncResult test_i32_array_extend_alloc(void) {
TestFuncResult test_i32_array_copy_alloc(void) {
b8 result;
Allocator allocator = wapp_mem_arena_allocator_init(MB(4));
Allocator allocator = wapp_mem_arena_allocator_init(MiB(4));
I32Array src = wapp_array(i32, I32Array, 1, 2, 3, 4, 5);
I32Array dst1 = wapp_array(i32, I32Array, 1, 2, 3, 4, 5, 6);
I32Array dst2 = wapp_array(i32, I32Array, 1, 2);