mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
6abf32fd52
The following "rm-gocheck:"-prefixed commits were generated by
go run rm-gocheck.go --commit
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 8f64611c83
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
35 lines
568 B
Go
35 lines
568 B
Go
// +build ignore
|
|
|
|
package main
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
|
|
"gotest.tools/assert"
|
|
)
|
|
|
|
type fn func(arg1, arg2 string, extra ...interface{}) bool
|
|
type assertfn func(t assert.TestingT, comparison assert.BoolOrComparison, msgAndArgs ...interface{})
|
|
|
|
func before(
|
|
t *testing.T,
|
|
a assertfn,
|
|
eg_contains fn,
|
|
arg1 string,
|
|
arg2 string,
|
|
extra ...interface{}) {
|
|
|
|
a(t, !eg_contains(arg1, arg2, extra...))
|
|
}
|
|
|
|
func after(
|
|
t *testing.T,
|
|
a assertfn,
|
|
eg_contains fn,
|
|
arg1 string,
|
|
arg2 string,
|
|
extra ...interface{}) {
|
|
|
|
a(t, !strings.Contains(arg1, arg2), extra...)
|
|
}
|