From 9aad19327eb719775a874f8f18bb15958db1d471 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Mon, 9 Nov 2009 21:23:52 -0800 Subject: - replaced gofmt expression formatting algorithm with rsc's algorithm - applied gofmt -w misc src - partial CL (last chunk) R=rsc, r http://go/go-review/1024041 --- src/pkg/testing/testing.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/pkg/testing/testing.go') diff --git a/src/pkg/testing/testing.go b/src/pkg/testing/testing.go index 62c79e0b3..1fbc4f4a9 100644 --- a/src/pkg/testing/testing.go +++ b/src/pkg/testing/testing.go @@ -32,7 +32,7 @@ func tabify(s string) string { } 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; @@ -62,12 +62,12 @@ func (t *T) FailNow() { // Log formats its arguments using default formatting, analogous to Print(), // and records the text in the error log. -func (t *T) Log(args ...) { t.errors += "\t"+tabify(fmt.Sprintln(args)) } +func (t *T) Log(args ...) { t.errors += "\t" + tabify(fmt.Sprintln(args)) } // Log formats its arguments according to the format, analogous to Printf(), // and records the text in the error log. func (t *T) Logf(format string, args ...) { - t.errors += "\t"+tabify(fmt.Sprintf(format, args)) + t.errors += "\t" + tabify(fmt.Sprintf(format, args)) } // Error is equivalent to Log() followed by Fail(). -- cgit v1.2.3