Commit 64798a11 authored by Chris Müller's avatar Chris Müller

test: add assertions for array operations using insert and remove.

parent 9405bf98
......@@ -49,12 +49,18 @@ test_array_operations(const_pointer data)
assert(cry_array_size(array) == 4);
assert(cry_array_alloc(array) == 8);
assert(cry_array_get(array, 0) != 0);
printf("%s", cry_array_get(array, 0));
assert(strcmp(cry_array_get(array, 0), "CDE") == 0);
assert(cry_array_insert(array, 1, "A", 1) == CRY_OKAY);
assert(cry_array_size(array) == 5);
assert(cry_array_alloc(array) == 8);
assert(cry_array_get(array, 0) != 0);
assert(strcmp(cry_array_get(array, 0), "CADE") == 0);
cry_array_free(array);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment