Add test for ALGO_MAP
Fix issue with ALGO_MAP.
This commit is contained in:
1 parent
5bae6d0870
commit
0c22a620b9
2 files changed
+8
-2
No files matched your search
@@ -28,6 +28,11 @@ static void test_list(void)
|
||||
list_int_push_back (l, 17);
|
||||
assert( algo_list_count(l, 17) == 2);
|
||||
assert( algo_list_count(l, -1) == 0);
|
||||
|
||||
#define f(x) assert((x) >= 0 && (x) < 100);
|
||||
ALGO_MAP(l, LIST_OPLIST(int), f);
|
||||
#define g(y, x) assert((x) >= 0 && (x) < y);
|
||||
ALGO_MAP(l, LIST_OPLIST(int), g, 100);
|
||||
|
||||
list_int_clear(l);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user