From b8d88a9913613558ccc2b082e7c3597481e710de Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Thu, 5 Nov 2009 15:12:37 -0800 Subject: gofmt-ify strings, template R=r http://go/go-review/1018064 --- src/pkg/strings/strings_test.go | 42 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 23 deletions(-) (limited to 'src/pkg/strings/strings_test.go') diff --git a/src/pkg/strings/strings_test.go b/src/pkg/strings/strings_test.go index 0db3c97416..cdf3437c3d 100644 --- a/src/pkg/strings/strings_test.go +++ b/src/pkg/strings/strings_test.go @@ -5,10 +5,10 @@ package strings_test import ( - . "strings"; - "testing"; - "unicode"; - "utf8"; + . "strings"; + "testing"; + "unicode"; + "utf8"; ) func eq(a, b []string) bool { @@ -234,18 +234,14 @@ func TestMap(t *testing.T) { // Run a couple of awful growth/shrinkage tests a := tenRunes('a'); // 1. Grow. This triggers two reallocations in Map. - maxRune := func(rune int) int { - return unicode.MaxRune; - }; + maxRune := func(rune int) int { return unicode.MaxRune }; m := Map(maxRune, a); expect := tenRunes(unicode.MaxRune); if m != expect { t.Errorf("growing: expected %q got %q", expect, m); } // 2. Shrink - minRune := func(rune int) int { - return 'a'; - }; + minRune := func(rune int) int { return 'a' }; m = Map(minRune, tenRunes(unicode.MaxRune)); expect = a; if m != expect { @@ -308,18 +304,18 @@ func TestCaseConsistency(t *testing.T) { if !equal("ToLower(lower)", ToLower(lower), lower, t) { t.Error("ToLower(lower) consistency fail"); } -/* - These fail because of non-one-to-oneness of the data, such as multiple - upper case 'I' mapping to 'i'. We comment them out but keep them for - interest. - For instance: CAPITAL LETTER I WITH DOT ABOVE: - unicode.ToUpper(unicode.ToLower('\u0130')) != '\u0130' - - if !equal("ToUpper(lower)", ToUpper(lower), upper, t) { - t.Error("ToUpper(lower) consistency fail"); - } - if !equal("ToLower(upper)", ToLower(upper), lower, t) { - t.Error("ToLower(upper) consistency fail"); - } + /* + These fail because of non-one-to-oneness of the data, such as multiple + upper case 'I' mapping to 'i'. We comment them out but keep them for + interest. + For instance: CAPITAL LETTER I WITH DOT ABOVE: + unicode.ToUpper(unicode.ToLower('\u0130')) != '\u0130' + + if !equal("ToUpper(lower)", ToUpper(lower), upper, t) { + t.Error("ToUpper(lower) consistency fail"); + } + if !equal("ToLower(upper)", ToLower(upper), lower, t) { + t.Error("ToLower(upper) consistency fail"); + } */ } -- cgit v1.3