tests: Macro-ize compare_matrices()

This way, we'll print out the location of the assertion failure in the
right place.