test for to_array