aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/gopkg.in/check.v1/check.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gopkg.in/check.v1/check.go')
-rw-r--r--vendor/gopkg.in/check.v1/check.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/vendor/gopkg.in/check.v1/check.go b/vendor/gopkg.in/check.v1/check.go
index 82c26fa73..137a2749a 100644
--- a/vendor/gopkg.in/check.v1/check.go
+++ b/vendor/gopkg.in/check.v1/check.go
@@ -156,7 +156,7 @@ func (td *tempDir) newPath() string {
}
}
result := filepath.Join(td.path, strconv.Itoa(td.counter))
- td.counter += 1
+ td.counter++
return result
}
@@ -274,7 +274,7 @@ func (c *C) logString(issue string) {
func (c *C) logCaller(skip int) {
// This is a bit heavier than it ought to be.
- skip += 1 // Our own frame.
+ skip++ // Our own frame.
pc, callerFile, callerLine, ok := runtime.Caller(skip)
if !ok {
return
@@ -284,7 +284,7 @@ func (c *C) logCaller(skip int) {
testFunc := runtime.FuncForPC(c.method.PC())
if runtime.FuncForPC(pc) != testFunc {
for {
- skip += 1
+ skip++
if pc, file, line, ok := runtime.Caller(skip); ok {
// Note that the test line may be different on
// distinct calls for the same test. Showing
@@ -460,10 +460,10 @@ func (tracker *resultTracker) _loopRoutine() {
// Calls still running. Can't stop.
select {
// XXX Reindent this (not now to make diff clear)
- case c = <-tracker._expectChan:
- tracker._waiting += 1
+ case <-tracker._expectChan:
+ tracker._waiting++
case c = <-tracker._doneChan:
- tracker._waiting -= 1
+ tracker._waiting--
switch c.status() {
case succeededSt:
if c.kind == testKd {
@@ -498,9 +498,9 @@ func (tracker *resultTracker) _loopRoutine() {
select {
case tracker._stopChan <- true:
return
- case c = <-tracker._expectChan:
- tracker._waiting += 1
- case c = <-tracker._doneChan:
+ case <-tracker._expectChan:
+ tracker._waiting++
+ case <-tracker._doneChan:
panic("Tracker got an unexpected done call.")
}
}
@@ -568,13 +568,13 @@ func newSuiteRunner(suite interface{}, runConf *RunConf) *suiteRunner {
var filterRegexp *regexp.Regexp
if conf.Filter != "" {
- if regexp, err := regexp.Compile(conf.Filter); err != nil {
+ regexp, err := regexp.Compile(conf.Filter)
+ if err != nil {
msg := "Bad filter expression: " + err.Error()
runner.tracker.result.RunError = errors.New(msg)
return runner
- } else {
- filterRegexp = regexp
}
+ filterRegexp = regexp
}
for i := 0; i != suiteNumMethods; i++ {