summaryrefslogtreecommitdiff
path: root/tests.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests.c')
-rw-r--r--tests.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests.c b/tests.c
index e9e0c31..8b200d8 100644
--- a/tests.c
+++ b/tests.c
@@ -34,16 +34,14 @@ static void allocr_test(void) {
for (int i = 0; i < nfoos2; i++)
assert(foos[i] == i);
- Array arr;
- arr_create(&arr, sizeof(int));
+ int *arr = NULL;
int n = 1000;
for (int i = 0; i < n; i++) {
int *p = arr_adda(&arr, &a);
*p = i;
}
- int *arr_data = arr.data;
for (int i = 0; i < n; i++) {
- assert(arr_data[i] == i);
+ assert(arr[i] == i);
}
allocr_free_all(&a);
@@ -51,4 +49,5 @@ static void allocr_test(void) {
static void test_all(void) {
allocr_test();
+ arr_test();
}