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
This is related to #2 in that it allows approval on-the-fly, but in a more elaborated manner.
E.g. there's a use case to adjust a program while it is only covered by golden master tests. This could be as simple as adapting the output format, or more complex changes. For very regular changes (e.g replace space by tab) there could be an automatic way to approve changes, if the output changes in the described way. This could leverage the power of tools like kdiff3 and sed.
Questions:
is it enough to let the user provide an "oracle" method like assess(input, output)?
how to ensure this "oracle" is only active once/for the current change?
how does this relate to the comparison built into FastApproval (cf. ExecutableDifferenceReporter)?
The text was updated successfully, but these errors were encountered:
I did a rough sketch of using native programs as oracles on the branch oracle-issue18.
The ExampleGoldenMasterTest shows how a ExecutableDifferenceReporter can be used as an oracle to judge differences, where it compares text disregarding case (using Windows' FC). It uses a locked oracle that applies once, then generates a .lock file. With the .lock file in place, the oracle is not asked (avoiding accidental approval of mismatching outputs). The user can reenable the oracle (without changing code) by removing the .lock file.
Similarly, one can define an oracle that is always asked to approve mismatching outputs, e.g. one that treats "__" and \t as equivalent (i.e. accepts tab for 2 consecutive spaces and v.v.).
This is related to #2 in that it allows approval on-the-fly, but in a more elaborated manner.
E.g. there's a use case to adjust a program while it is only covered by golden master tests. This could be as simple as adapting the output format, or more complex changes. For very regular changes (e.g replace space by tab) there could be an automatic way to approve changes, if the output changes in the described way. This could leverage the power of tools like kdiff3 and sed.
Questions:
assess(input, output)
?ExecutableDifferenceReporter
)?The text was updated successfully, but these errors were encountered: