test: added test for push_front

This commit is contained in:
2026-04-16 20:56:48 -06:00
parent 789fbf7d4c
commit b55432448e
2 changed files with 66 additions and 2 deletions

View File

@@ -162,9 +162,9 @@ ArrayListErr arraylist_push_front(ArrayList *arr, void *data) {
// No problem if array is full because it grows if it's full
memmove(
arr->buffer,
arr->buffer + arr->elem_size,
(arr->len - 1) * arr->elem_size
arr->buffer,
(arr->len) * arr->elem_size
);
memcpy(