test: added tests for clear

This commit is contained in:
2026-04-18 19:22:17 -06:00
parent 2d66b35e0e
commit 532a84fa8f
3 changed files with 49 additions and 3 deletions

View File

@@ -64,9 +64,6 @@ ArrayListErr arraylist_clear(ArrayList *arr) {
return ARRLIST_NULL_ARG;
}
memset(arr->buffer, 0, arr->capacity * arr->elem_size);
arr->capacity = 0;
arr->elem_size = 0;
arr->len = 0;
return ARRLIST_OK;
}