You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By adding aPrintOrderEntry::ParallelEnd variant to be output from PrintOrderer::print_order, we can drastically simplify our property_indents_are_correct test method.
Details
The PrintOrderer code from #29 only writes when parallel entries start to the ordering output from PrintOrderer::print_order. The ending of parallelism is implicitly specified by the indent level decreasing in a subsequent PrintOrderEntry::Node. This doesn't make printing any harder, as there is no need to print when parallel nodes end. However, not having this information does make the property based testing code more complicated. Instead of ensuring that the indent level in the PrintOrderEntry matches the expected depth of the indent stack, we have to check if the indent level is exactly one less than the number of entries on the stack, which indicates that parallelism has ended. This occurs in multiple match clauses and makes the test harder to read.
The text was updated successfully, but these errors were encountered:
TLDR
By adding a
PrintOrderEntry::ParallelEnd
variant to be output fromPrintOrderer::print_order
, we can drastically simplify ourproperty_indents_are_correct
test method.Details
The
PrintOrderer
code from #29 only writes when parallel entries start to the ordering output fromPrintOrderer::print_order
. The ending of parallelism is implicitly specified by the indent level decreasing in a subsequentPrintOrderEntry::Node
. This doesn't make printing any harder, as there is no need to print when parallel nodes end. However, not having this information does make the property based testing code more complicated. Instead of ensuring that the indent level in thePrintOrderEntry
matches the expected depth of the indent stack, we have to check if the indent level is exactly one less than the number of entries on the stack, which indicates that parallelism has ended. This occurs in multiple match clauses and makes the test harder to read.The text was updated successfully, but these errors were encountered: