aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/bytes/buffer_test.go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2011-03-30 15:33:16 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2011-03-30 15:33:16 +0000
commitf72f4169133572cf62f1e872c5657cdbc4d5de2c (patch)
tree9382d76e5dc68294cdf3c4f2c03a9f61b44fb014 /libgo/go/bytes/buffer_test.go
parentf2034d064c29d9620c5562b2b5b517bdc6c7a672 (diff)
downloadgcc-f72f4169133572cf62f1e872c5657cdbc4d5de2c.zip
gcc-f72f4169133572cf62f1e872c5657cdbc4d5de2c.tar.gz
gcc-f72f4169133572cf62f1e872c5657cdbc4d5de2c.tar.bz2
Update to current Go library.
From-SVN: r171732
Diffstat (limited to 'libgo/go/bytes/buffer_test.go')
-rw-r--r--libgo/go/bytes/buffer_test.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/libgo/go/bytes/buffer_test.go b/libgo/go/bytes/buffer_test.go
index 56a2d92..14f9501 100644
--- a/libgo/go/bytes/buffer_test.go
+++ b/libgo/go/bytes/buffer_test.go
@@ -178,7 +178,11 @@ func TestBasicOperations(t *testing.T) {
func TestLargeStringWrites(t *testing.T) {
var buf Buffer
- for i := 3; i < 30; i += 3 {
+ limit := 30
+ if testing.Short() {
+ limit = 9
+ }
+ for i := 3; i < limit; i += 3 {
s := fillString(t, "TestLargeWrites (1)", &buf, "", 5, data)
empty(t, "TestLargeStringWrites (2)", &buf, s, make([]byte, len(data)/i))
}
@@ -188,7 +192,11 @@ func TestLargeStringWrites(t *testing.T) {
func TestLargeByteWrites(t *testing.T) {
var buf Buffer
- for i := 3; i < 30; i += 3 {
+ limit := 30
+ if testing.Short() {
+ limit = 9
+ }
+ for i := 3; i < limit; i += 3 {
s := fillBytes(t, "TestLargeWrites (1)", &buf, "", 5, bytes)
empty(t, "TestLargeByteWrites (2)", &buf, s, make([]byte, len(data)/i))
}