Improve testability by making code generator functions return lists of multiline strings, instead of one multiline string, and testing each list item independently.