summaryrefslogtreecommitdiff
path: root/src/pkg/testing/testing.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-10-07 11:55:06 -0700
committerRuss Cox <rsc@golang.org>2009-10-07 11:55:06 -0700
commit2b77e59eaed6d039951b5ef7ad1f3db421962dc2 (patch)
tree10feec844f56ec9dce304804c581d9c5209e74c1 /src/pkg/testing/testing.go
parent5843e5da3dca981d5b2522a3be91bd1426c71d26 (diff)
downloadgolang-2b77e59eaed6d039951b5ef7ad1f3db421962dc2.tar.gz
apply gofmt to rand reflect regexp rpc runtime sort strconv strings sync syscall testing time unicode unsafe utf8
R=gri DELTA=1409 (79 added, 24 deleted, 1306 changed) OCL=35415 CL=35437
Diffstat (limited to 'src/pkg/testing/testing.go')
-rw-r--r--src/pkg/testing/testing.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/pkg/testing/testing.go b/src/pkg/testing/testing.go
index 435d7af4b..df542e20b 100644
--- a/src/pkg/testing/testing.go
+++ b/src/pkg/testing/testing.go
@@ -30,12 +30,12 @@ func tabify(s string) string {
s += "\n";
n++;
}
- for i := 0; i < n - 1; i++ { // -1 to avoid final newline
+ for i := 0; i < n-1; i++ { // -1 to avoid final newline
if s[i] == '\n' {
- return s[0:i+1] + "\t" + tabify(s[i+1:n]);
+ return s[0 : i+1]+"\t"+tabify(s[i+1 : n]);
}
}
- return s
+ return s;
}
// T is a type passed to Test functions to manage test state and support formatted test logs.
@@ -48,12 +48,12 @@ type T struct {
// Fail marks the Test function as having failed but continues execution.
func (t *T) Fail() {
- t.failed = true
+ t.failed = true;
}
// Failed returns whether the Test function has failed.
func (t *T) Failed() bool {
- return t.failed
+ return t.failed;
}
// FailNow marks the Test function as having failed and stops its execution.
@@ -103,8 +103,8 @@ func (t *T) Fatalf(format string, args ...) {
// An internal type but exported because it is cross-package; part of the implementation
// of gotest.
type Test struct {
- Name string;
- F func(*T);
+ Name string;
+ F func(*T);
}
func tRunner(t *T, test *Test) {