made a discovery of some kind of fuckup
This commit is contained in:
@@ -185,7 +185,7 @@ Test(arena_allocator, dyn_array_resize_pattern) {
|
||||
allocator_t arena = arena_allocator_create(backing, 10 * KB);
|
||||
allocator_reset(arena);
|
||||
|
||||
int *arr = make_arr(int, arena);
|
||||
int *arr = arr_make(int, arena);
|
||||
|
||||
// Add 100 elements, forcing multiple resizes
|
||||
for (int i = 0; i < 100; i++) {
|
||||
@@ -206,8 +206,8 @@ Test(arena_allocator, multiple_arrays_resize) {
|
||||
allocator_t arena = arena_allocator_create(backing, 20 * KB);
|
||||
allocator_reset(arena);
|
||||
|
||||
int *arr1 = make_arr(int, arena);
|
||||
int *arr2 = make_arr(int, arena);
|
||||
int *arr1 = arr_make(int, arena);
|
||||
int *arr2 = arr_make(int, arena);
|
||||
|
||||
// Add to arr1
|
||||
for (int i = 0; i < 50; i++) {
|
||||
@@ -266,11 +266,11 @@ Test(arena_allocator, nested_structures_with_resize) {
|
||||
allocator_reset(arena);
|
||||
|
||||
// Create array of int pointers (like dyn_array of dyn_arrays)
|
||||
int **rows = make_arr(int*, arena);
|
||||
int **rows = arr_make(int*, arena);
|
||||
|
||||
// Add 5 rows
|
||||
for (int i = 0; i < 5; i++) {
|
||||
int *row = make_arr(int, arena);
|
||||
int *row = arr_make(int, arena);
|
||||
for (int j = 0; j < 10; j++) {
|
||||
arr_append(row, i * 10 + j);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user