From 22e8133f95c3b4401d3fc38fa90782677c1cf6a9 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Wed, 29 Sep 2021 23:30:20 +0200 Subject: [PATCH] Test for corrected issue of IT_INSERT (Wrong behavior if IT==END) --- tests/test-marray.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test-marray.c b/tests/test-marray.c index 1f17637d..ed56df9c 100644 --- a/tests/test-marray.c +++ b/tests/test-marray.c @@ -339,6 +339,13 @@ static void test_d(void) array_uint_insert(a1, it2, 17); assert (array_uint_size(a1) == 300); assert (*array_uint_ref(it2) == 17); + + array_uint_it_end(it2, a1); + array_uint_insert(a1, it2, 17789); + assert (array_uint_size(a1) == 301); + assert (*array_uint_ref(it2) == 17789); + array_uint_it(it, a1); + assert (array_uint_it_equal_p (it, it2)); array_uint_init_set (a2, a1); assert (array_uint_equal_p (a2, a1));