Closed stephen-swensen closed 5 years ago
@eiriktsarpalis any preference on Option A vs. Option B? I'm partial to Option B because to me it appears to provide the two most important pieces of information given by the regular test
operator but without the noise of the intermediate reduction steps: the source assertion expression and the final reduction (well, the final two reduction - the second to last one is the interesting one here; we'd preserve false
just for closer symmetry to test
). I suppose the appeal of Option A would be just to have a truly stripped down, source assertion only decompilation.
The main issue with B seems to be that it can blow up in certain cases, e.g. performing structural equality checks on large values. Just emitting the initial tree should provide sufficient context to the test author for establishing what went wrong.
@eiriktsarpalis that's fair - Option A it is. Thinking about it more, anyone who'd be more interested in Option B would probably just go with the usual test
in the first place.
@eiriktsarpalis FYI - this is released as part of Unquote 5.0.0 today!
The output from
test
can be verbose and distracting, especially when it includes large object graphs. Provide a "simple" assertion operator (call ittestSimple
) that provides a less noisy alternative. The behavior oftest
should not be changed, because it is generally useful.See discussion in https://github.com/SwensenSoftware/unquote/pull/134
Depends on https://github.com/SwensenSoftware/unquote/issues/133 - decompiling and reducing
ValueWithName
expressions - to be effectiveGiven a test setup and assertion like the following
Produce output like the following:
Option A (just output the head expression)
Option B (just output the head and last expression; skip intermediate reductions)