Added unit tests for Map data type and fixed other issues

This commit is contained in:
2025-11-05 15:27:58 +01:00
parent e6a48e1c21
commit bc36a4c7e1
4 changed files with 370 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
/*
* Unit tests for Vector
* Unit tests for Vector data type
*/
#define TEST(NAME) do { \
@@ -48,7 +48,7 @@ void test_vector_push() {
vector_result_t y_res = vector_push(v, &y);
assert(y_res.status == VECTOR_OK);
assert(vector_size(v) == 1);
assert(vector_size(v) == 2);
vector_destroy(v);
}
@@ -274,6 +274,7 @@ int main(void) {
TEST(vector_new);
TEST(vector_new_zcap);
TEST(vector_push);
TEST(vector_push_realloc);
TEST(vector_get);
TEST(vector_get_ofb);