From 7b15ed9ef455b6b66c6b376898a88aef5d6a9970 Mon Sep 17 00:00:00 2001 From: Ondřej Surý Date: Tue, 26 Apr 2011 09:55:32 +0200 Subject: Imported Upstream version 2011.04.13 --- src/pkg/bytes/buffer_test.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/pkg/bytes/buffer_test.go') diff --git a/src/pkg/bytes/buffer_test.go b/src/pkg/bytes/buffer_test.go index 56a2d9275..14f950141 100644 --- a/src/pkg/bytes/buffer_test.go +++ b/src/pkg/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)) } -- cgit v1.2.3