From cb49cd7100f3bb452906853e14e276e2327f3a20 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Fri, 10 Apr 2020 08:35:44 +0200 Subject: [PATCH] * Fix integer overflow in test of mul reduction --- tests/test-malgo.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test-malgo.c b/tests/test-malgo.c index cdf0ca4d..7866e936 100644 --- a/tests/test-malgo.c +++ b/tests/test-malgo.c @@ -502,8 +502,12 @@ static void test_extract(void) assert (dst == 0); ALGO_REDUCE(dst, a, ARRAY_OPLIST(array_int), or); assert (dst == 127); + + array_int_clean(a); + for(int i = 1; i < 10; i++) + array_int_push_back(a, i); ALGO_REDUCE(dst, a, ARRAY_OPLIST(array_int), product); - assert (dst == 0); + assert (dst == 362880); array_int_clear(a); list_int_clear(l);