Many minor fixes, changes and first attempt of codecov

Changes on assert.h, foreach.h, test.h and timer.h
Updated benchmarks, examples and tests
Updated tests/Makefile for future
Added list.c test
Added CMC namespace to CONCATC and CONCATH on macro_collections.h
This commit is contained in:
Leonardo committed 2019-06-28 00:52:23 -03:00
1 parent 1edb12a83c
commit 7b349ea426
15 files changed
+1009 -742

No files matched your search

+1 -1
View File
@@ -57,7 +57,7 @@ int main(void)
// Inside, the variable 'iter' will be available and from it you can access
// the key, value or index.
printf("MAP[%4d] = %.3lf\n", hm_iter_key(&iter), hm_iter_value(&iter));
})
});
hm_free(map);
+5 -5
View File
@@ -61,7 +61,7 @@ int main(int argc, char const *argv[])
map_insert(library, value->isbn, value->name);
set_insert(counter, value->name);
})
});
printf("Library Size: %d\n", map_count(library));
printf("Unique book titles: %d\n\n", set_count(counter));
@@ -69,7 +69,7 @@ int main(int argc, char const *argv[])
FOR_EACH(q, queue, shelf, {
book *value = q_iter_value(&iter);
printf("[ %d : %-45s ]\n", value->isbn, value->name);
})
});
printf("\n");
set_free(counter);
@@ -122,11 +122,11 @@ int main(int argc, char const *argv[])
if (chrcmp(buffer, value) == 0)
il_push_back(search_list, key);
})
});
FOR_EACH(il, intlist, search_list, {
printf("[ %d ]\n", il_iter_value(&iter));
})
});
il_free(search_list);
}
@@ -140,7 +140,7 @@ int main(int argc, char const *argv[])
free(b->name);
free(b);
})
});
l_free(books);
q_free(shelf);
+6 -6
View File
@@ -67,7 +67,7 @@ int main(int argc, char const *argv[])
printf("%d ]\n", value);
else
printf("%d, ", value);
})
});
FOR_EACH(s, stack, s, {
int value = s_iter_value(&iter);
@@ -78,7 +78,7 @@ int main(int argc, char const *argv[])
printf("%d ]\n", value);
else
printf("%d, ", value);
})
});
FOR_EACH(q, queue, q, {
int value = q_iter_value(&iter);
@@ -89,7 +89,7 @@ int main(int argc, char const *argv[])
printf("%d ]\n", value);
else
printf("%d, ", value);
})
});
FOR_EACH(d, deque, d, {
int value = d_iter_value(&iter);
@@ -100,7 +100,7 @@ int main(int argc, char const *argv[])
printf("%d ]\n", value);
else
printf("%d, ", value);
})
});
FOR_EACH(ll, llist, ll, {
int value = ll_iter_value(&iter);
@@ -111,7 +111,7 @@ int main(int argc, char const *argv[])
printf("%d ]\n", value);
else
printf("%d, ", value);
})
});
FOR_EACH(ts, tset, ts, {
int value = ts_iter_value(&iter);
@@ -122,7 +122,7 @@ int main(int argc, char const *argv[])
printf("%d ]\n", value);
else
printf("%d, ", value);
})
});
l_free(l);
ll_free(ll);
@@ -186,7 +186,7 @@ int main(void)
int sum = 0;
FOR_EACH(il, int_list, integers, {
sum += il_iter_value(&iter);
})
});
printf("\n\nSUM: %d\n", sum);
@@ -256,7 +256,7 @@ int main(void)
FOR_EACH(dq, deque, d, {
sum3 += dq_iter_value(&iter);
})
});
printf("Deque sum: %d\n", sum3);