Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1598)

Issue 13651043: testing/checkers: implement Set

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 7 months ago by rog
Modified:
10 years, 7 months ago
Reviewers:
dimitern, natefinch, mp+184830
Visibility:
Public.

Description

testing/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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -0 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A testing/checkers/set.go View 1 2 1 chunk +35 lines, -0 lines 0 comments Download
A testing/checkers/set_test.go View 1 2 1 chunk +54 lines, -0 lines 0 comments Download

Messages

Total messages: 4
rog
Please take a look.
10 years, 7 months ago (2013-09-10 17:03:44 UTC) #1
dimitern
On 2013/09/10 17:03:44, rog wrote: > Please take a look. LGTM, nice! Thanks for the ...
10 years, 7 months ago (2013-09-10 17:30:16 UTC) #2
rog
Please take a look.
10 years, 7 months ago (2013-09-10 17:37:24 UTC) #3
natefinch
10 years, 7 months ago (2013-09-10 17:40:43 UTC) #4
LGTM
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b