mirror of
https://github.com/golang/go
synced 2024-11-21 23:44:39 -07:00
testing: rename type Test to InternalTest
type Benchmark has been renamed to InternalBenchmark R=rsc CC=golang-dev https://golang.org/cl/2942042
This commit is contained in:
parent
9e1ee8ff4f
commit
3b44fbe869
@ -150,7 +150,7 @@ importpath=$(gomake -s importpath)
|
|||||||
echo 'import __regexp__ "regexp"' # rename in case tested package is called regexp
|
echo 'import __regexp__ "regexp"' # rename in case tested package is called regexp
|
||||||
# test array
|
# test array
|
||||||
echo
|
echo
|
||||||
echo 'var tests = []testing.Test{'
|
echo 'var tests = []testing.InternalTest{'
|
||||||
for i in $tests
|
for i in $tests
|
||||||
do
|
do
|
||||||
echo ' {"'$i'", '$i'},'
|
echo ' {"'$i'", '$i'},'
|
||||||
|
@ -123,19 +123,19 @@ func (t *T) Fatalf(format string, args ...interface{}) {
|
|||||||
|
|
||||||
// An internal type but exported because it is cross-package; part of the implementation
|
// An internal type but exported because it is cross-package; part of the implementation
|
||||||
// of gotest.
|
// of gotest.
|
||||||
type Test struct {
|
type InternalTest struct {
|
||||||
Name string
|
Name string
|
||||||
F func(*T)
|
F func(*T)
|
||||||
}
|
}
|
||||||
|
|
||||||
func tRunner(t *T, test *Test) {
|
func tRunner(t *T, test *InternalTest) {
|
||||||
test.F(t)
|
test.F(t)
|
||||||
t.ch <- t
|
t.ch <- t
|
||||||
}
|
}
|
||||||
|
|
||||||
// An internal function but exported because it is cross-package; part of the implementation
|
// An internal function but exported because it is cross-package; part of the implementation
|
||||||
// of gotest.
|
// of gotest.
|
||||||
func Main(matchString func(pat, str string) (bool, os.Error), tests []Test) {
|
func Main(matchString func(pat, str string) (bool, os.Error), tests []InternalTest) {
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
ok := true
|
ok := true
|
||||||
if len(tests) == 0 {
|
if len(tests) == 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user