matrices: clean up tests to be more succinct