by lambdadmitry · 4y ago · 0 comments
Generally, if something is boring and repetitive it's probably shouldn't be written, better code generation is rarely a good answer.
I suppose you could test "if I convert the AST back to a string do I get the same result", but that's not actually your goal with an Abstract Syntax Tree. If nothing else the white space should be allowed to change.
What sort of property tests did you have in mind?