aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Mundy <go.peter.90@gmail.com>2010-11-05 23:05:53 -0400
committerRuss Cox <rsc@golang.org>2010-11-05 23:05:53 -0400
commit3b44fbe8693a649243afb08a9eb27e2c95901b71 (patch)
tree88197071ddfa08a251c7d65f35fb27a8950de737
parent9e1ee8ff4f09a58f70f68b5d4726afcf5aa315b2 (diff)
downloadgo-3b44fbe8693a649243afb08a9eb27e2c95901b71.tar.xz
testing: rename type Test to InternalTest
type Benchmark has been renamed to InternalBenchmark R=rsc CC=golang-dev https://golang.org/cl/2942042
-rwxr-xr-xsrc/cmd/gotest/gotest2
-rw-r--r--src/pkg/testing/testing.go6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/gotest/gotest b/src/cmd/gotest/gotest
index 7c2c5fbaaf..7572610d2e 100755
--- a/src/cmd/gotest/gotest
+++ b/src/cmd/gotest/gotest
@@ -150,7 +150,7 @@ importpath=$(gomake -s importpath)
echo 'import __regexp__ "regexp"' # rename in case tested package is called regexp
# test array
echo
- echo 'var tests = []testing.Test{'
+ echo 'var tests = []testing.InternalTest{'
for i in $tests
do
echo ' {"'$i'", '$i'},'
diff --git a/src/pkg/testing/testing.go b/src/pkg/testing/testing.go
index b01f6336fc..ae6d034646 100644
--- a/src/pkg/testing/testing.go
+++ b/src/pkg/testing/testing.go
@@ -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
// of gotest.
-type Test struct {
+type InternalTest struct {
Name string
F func(*T)
}
-func tRunner(t *T, test *Test) {
+func tRunner(t *T, test *InternalTest) {
test.F(t)
t.ch <- t
}
// An internal function but exported because it is cross-package; part of the implementation
// 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()
ok := true
if len(tests) == 0 {