diff options
| author | Robert Griesemer <gri@golang.org> | 2009-11-05 15:12:37 -0800 |
|---|---|---|
| committer | Robert Griesemer <gri@golang.org> | 2009-11-05 15:12:37 -0800 |
| commit | b8d88a9913613558ccc2b082e7c3597481e710de (patch) | |
| tree | 49450521eb612da9c2825947cb2d12ec5458126e /src/pkg/strings/strings_test.go | |
| parent | 5f50a8186360837aa23e338b35a0576b680decce (diff) | |
| download | go-b8d88a9913613558ccc2b082e7c3597481e710de.tar.xz | |
gofmt-ify strings, template
R=r
http://go/go-review/1018064
Diffstat (limited to 'src/pkg/strings/strings_test.go')
| -rw-r--r-- | src/pkg/strings/strings_test.go | 40 |
1 files changed, 18 insertions, 22 deletions
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' + /* + 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"); - } + 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"); + } */ } |
