summaryrefslogtreecommitdiff
path: root/tests.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests.c')
-rw-r--r--tests.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests.c b/tests.c
index e49eafe..d3805dd 100644
--- a/tests.c
+++ b/tests.c
@@ -10,18 +10,18 @@ static void allocr_test(void) {
for (int x = 1000; x <= 8000; x += 1000) {
int nfoos = x;
int *foos = allocr_malloc(&a, (size_t)nfoos * sizeof(int));
-
- for (int i = 0; i < nfoos; i++)
+ int i;
+ for (i = 0; i < nfoos; ++i)
foos[i] = i;
- for (int i = 0; i < nfoos; i++)
+ for (i = 0; i < nfoos; ++i)
assert(foos[i] == i);
int nbars = x;
int *bars = allocr_calloc(&a, (size_t)nbars, sizeof(int));
- for (int i = 0; i < nbars; i++)
+ for (i = 0; i < nbars; ++i)
assert(bars[i] == 0);
- for (int i = 0; i < nbars; i++)
+ for (i = 0; i < nbars; ++i)
bars[i] = i;
- for (int i = 0; i < nbars; i++)
+ for (i = 0; i < nbars; ++i)
assert(bars[i] == i);
}
allocr_free_all(&a);