Modify set tests to print sorted sets directly

instead of creating temporary lists and sorting those in-place