From 7b46891622440af7153bc79518d754c94c0c3597 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Mon, 20 Apr 2020 23:49:35 +0200 Subject: [PATCH] Add test for ALGO_REDUCE with different type --- tests/test-malgo.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test-malgo.c b/tests/test-malgo.c index 7866e936..8678c0fe 100644 --- a/tests/test-malgo.c +++ b/tests/test-malgo.c @@ -503,6 +503,10 @@ static void test_extract(void) ALGO_REDUCE(dst, a, ARRAY_OPLIST(array_int), or); assert (dst == 127); + unsigned long long dst_l; + ALGO_REDUCE( (dst_l, M_OPEXTEND(M_STANDARD_OPLIST, TYPE(unsigned long long))), a, array_int_t, sum); + assert (dst_l == 100*99/2-10*11/2); + array_int_clean(a); for(int i = 1; i < 10; i++) array_int_push_back(a, i);