]> Cypherpunks repositories - gostls13.git/commitdiff
bytes: delete the test for huge buffers
authorRob Pike <r@golang.org>
Sun, 22 Jan 2012 17:25:47 +0000 (09:25 -0800)
committerRob Pike <r@golang.org>
Sun, 22 Jan 2012 17:25:47 +0000 (09:25 -0800)
It takes too much memory to be reliable and causes
trouble on 32-bit machines.
Sigh.

Fixes #2756.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5567043

src/pkg/bytes/buffer_test.go

index 59211deb21461aa82f5c7db0df528967fcf44f0d..d0af11f104b9d1706a70121c2523bf946cf5ef22 100644 (file)
@@ -386,24 +386,3 @@ func TestReadEmptyAtEOF(t *testing.T) {
                t.Errorf("wrong count; got %d want 0", n)
        }
 }
-
-func TestHuge(t *testing.T) {
-       // About to use tons of memory, so avoid for simple installation testing.
-       if testing.Short() {
-               return
-       }
-       // We expect a panic.
-       defer func() {
-               if err, ok := recover().(error); ok && err == ErrTooLarge {
-                       return
-               } else {
-                       t.Error(`expected "too large" error; got`, err)
-               }
-       }()
-       b := new(Buffer)
-       big := make([]byte, 500e6)
-       for i := 0; i < 1000; i++ {
-               b.Write(big)
-       }
-       t.Error("panic expected")
-}