Fix an error in tests

Using gauged_{map,array}_import(NULL, length) to preallocate
the buffer incorrectly set the length as well as the size.