Descriptiontesting/checkers: implement Set
There are many places in the tests where we have
a custom field and closure to save and restore a value.
This proposal adds a helper to make that easier.
It also introduces a Restorer type that can be used
to make it more obvious when a closure is being
used to restore some state.
Example usage:
defer jc.Set(&someValue, testingValue).Restore()
https://code.launchpad.net/~rogpeppe/juju-core/386-testing-set-reset/+merge/184830
(do not edit description out of merge proposal)
Patch Set 1 #Patch Set 2 : testing/checkers: implement Set #Patch Set 3 : testing/checkers: implement Set #
MessagesTotal messages: 4
|