aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/bytes/bytes_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/bytes/bytes_test.go')
-rw-r--r--src/pkg/bytes/bytes_test.go16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/pkg/bytes/bytes_test.go b/src/pkg/bytes/bytes_test.go
index 094d71186f..24ee4bf4d2 100644
--- a/src/pkg/bytes/bytes_test.go
+++ b/src/pkg/bytes/bytes_test.go
@@ -5,10 +5,10 @@
package bytes_test
import (
- . "bytes";
- "strings";
- "testing";
- "unicode";
+ . "bytes";
+ "strings";
+ "testing";
+ "unicode";
)
func eq(a, b []string) bool {
@@ -241,18 +241,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, Bytes(a));
expect := tenRunes(unicode.MaxRune);
if string(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, Bytes(tenRunes(unicode.MaxRune)));
expect = a;
if string(m) != expect {