From 5025b3690de4f066a7921dd2e9535c00205a9081 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sun, 15 Jul 2018 22:26:59 +0200 Subject: [PATCH] Add test. --- tests/test-malgo.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test-malgo.c b/tests/test-malgo.c index aadbb41a..03b902b6 100644 --- a/tests/test-malgo.c +++ b/tests/test-malgo.c @@ -115,6 +115,9 @@ static void test_list(void) #define g(y, x) assert((x) >= 0 && (x) < y); ALGO_MAP(l, LIST_OPLIST(list_int), g, 100); + assert( algo_list_count_if(l, func_test_42) == 1); + assert( algo_list_count_if(l, func_test_101) == 0); + int *p = algo_list_min(l); assert(p != NULL && *p == 0); p = algo_list_max(l);