diff --git a/tests/tgen-marray.c b/tests/tgen-marray.c index 335db0e6..4f7cff63 100644 --- a/tests/tgen-marray.c +++ b/tests/tgen-marray.c @@ -30,6 +30,7 @@ void size_to_exactly(array_uint_t tab, size_t n); void push_back (array_uint_t tab, unsigned int n); void unpop(array_uint_t tab); void unpop_if(array_uint_t tab, unsigned int x); +void construct(void *p); unsigned int add_two(const array_uint_t tab, size_t i, size_t j) { @@ -57,3 +58,13 @@ void unpop_if(array_uint_t tab, unsigned int x) if (x == *array_uint_back(tab)) array_uint_pop_back(NULL, tab); } + +array_uint_t global; +extern void f(void *p); +void construct(void *p) +{ + array_uint_it_t mark; + array_uint_it_end(mark, global); + f(p); + array_uint_pop_until(global, mark); +}