testing outputs without relying on consistent array ordering