Add function used to obtain vector capacity

This commit is contained in:
Bailey Thompson
2018-01-25 19:48:27 -05:00
committed by GitHub
parent 00b849c42f
commit dd9e099605
3 changed files with 14 additions and 0 deletions

View File

@@ -88,6 +88,7 @@ void test_vector(void)
for (int i = 0; i < 10; i++) {
assert(data[i] == val[9 - i]);
}
assert(vector_capacity(me) >= vector_size(me));
int trimmed[5] = {0};
vector_trim(me);
vector_reserve(me, 3);