Backport of SI-7280

The pretty print in the test support code is slightly different than in the 2.11 pull request (scala/scala#3140), so the text of the `.check` files is not the same. The elements are the same, but the representation is different.