test: Added tests made for state consistency

Also changed a few things like usin asser_null and assert_non_null
--didn't knew they existed in cmocka, or at least forgot-- for better
clarity and readability.
This commit is contained in:
2026-04-16 08:42:01 -06:00
parent 7662af09f8
commit 1e7e6f7b8d
2 changed files with 117 additions and 11 deletions

View File

@@ -89,7 +89,7 @@ bool arraylist_is_empty(const ArrayList *arr) {
if (arr == NULL) {
return true;
}
return arr->capacity == 0;
return arr->len == 0;
}
static ArrayListErr arraylist_grow(ArrayList *arr) {