summaryrefslogtreecommitdiff
path: root/src/pkg/testing
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-08-03 17:26:15 +0200
committerOndřej Surý <ondrej@sury.org>2011-08-03 17:26:15 +0200
commite6b380032482808aee5e4c5222b6d7390f468e74 (patch)
treeffa792d4e5b06b5962e041dd272d06ebd9c0fe25 /src/pkg/testing
parentab23f6dab91e6ec615481c4b3e77e4639c3f871b (diff)
downloadgolang-e6b380032482808aee5e4c5222b6d7390f468e74.tar.gz
Imported Upstream version 2011.07.29upstream-weekly/2011.07.29
Diffstat (limited to 'src/pkg/testing')
-rw-r--r--src/pkg/testing/benchmark.go5
-rw-r--r--src/pkg/testing/iotest/reader.go1
-rw-r--r--src/pkg/testing/testing.go1
3 files changed, 3 insertions, 4 deletions
diff --git a/src/pkg/testing/benchmark.go b/src/pkg/testing/benchmark.go
index 3b416acfa..fd0bd8665 100644
--- a/src/pkg/testing/benchmark.go
+++ b/src/pkg/testing/benchmark.go
@@ -214,12 +214,13 @@ func RunBenchmarks(matchString func(pat, str string) (bool, os.Error), benchmark
for _, procs := range cpuList {
runtime.GOMAXPROCS(procs)
b := &B{benchmark: Benchmark}
- r := b.run()
benchName := Benchmark.Name
if procs != 1 {
benchName = fmt.Sprintf("%s-%d", Benchmark.Name, procs)
}
- print(fmt.Sprintf("%s\t%v\n", benchName, r))
+ print(fmt.Sprintf("%s\t", benchName))
+ r := b.run()
+ print(fmt.Sprintf("%v\n", r))
if p := runtime.GOMAXPROCS(-1); p != procs {
print(fmt.Sprintf("%s left GOMAXPROCS set to %d\n", benchName, p))
}
diff --git a/src/pkg/testing/iotest/reader.go b/src/pkg/testing/iotest/reader.go
index daa6ede08..dcf5565e0 100644
--- a/src/pkg/testing/iotest/reader.go
+++ b/src/pkg/testing/iotest/reader.go
@@ -37,7 +37,6 @@ func (r *halfReader) Read(p []byte) (int, os.Error) {
return r.r.Read(p[0 : (len(p)+1)/2])
}
-
// DataErrReader returns a Reader that returns the final
// error with the last data read, instead of by itself with
// zero bytes of data.
diff --git a/src/pkg/testing/testing.go b/src/pkg/testing/testing.go
index ba721523e..ec4a45371 100644
--- a/src/pkg/testing/testing.go
+++ b/src/pkg/testing/testing.go
@@ -74,7 +74,6 @@ func Short() bool {
return *short
}
-
// Insert final newline if needed and tabs after internal newlines.
func tabify(s string) string {
n := len(s)