tests: use xmalloc to allocate implementation array