-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
I'm quite impressed by (and a bit proud of!) the number of bugs that has been revealed through dhall's usage of prettyprinter!
I wonder how prettyprinter could rely less on the users to discover these bugs though.
In particular I wonder whether property tests could help – IMHO they've been quite effective in dhall!
For example I believe that the recent bugs could have been discovered by tests for the following properties:
- Unbounded layout of
grouped Line fails #91: The result of applyinglayout{Pretty,Smart} opts . groupto aDocthat doesn't containFail, should never containSFail. - For
removeTrailingWhitespace:- The (rendered) input and output should only differ by trailing spaces.
- The output should never contain trailing spaces.
removeTrailingWhitespaceis idempotent.
It's probably more difficult to come up with properties that would reveal unknown bugs, but it might be worth trying!
Metadata
Metadata
Assignees
Labels
No labels