go/src/bytes/buffer_test.go

const N

var testString

var testBytes

type negativeReader

func (r *negativeReader) Read([]byte) (int, error) {}

func init() {}

// Verify that contents of buf match the string s.
func check(t *testing.T, testname string, buf *Buffer, s string) {}

// Fill buf through n writes of string fus.
// The initial contents of buf corresponds to the string s;
// the result is the final contents of buf returned as a string.
func fillString(t *testing.T, testname string, buf *Buffer, s string, n int, fus string) string {}

// Fill buf through n writes of byte slice fub.
// The initial contents of buf corresponds to the string s;
// the result is the final contents of buf returned as a string.
func fillBytes(t *testing.T, testname string, buf *Buffer, s string, n int, fub []byte) string {}

func TestNewBuffer(t *testing.T) {}

var buf

// Calling NewBuffer and immediately shallow copying the Buffer struct
// should not result in any allocations.
// This can be used to reset the underlying []byte of an existing Buffer.
func TestNewBufferShallow(t *testing.T) {}

func TestNewBufferString(t *testing.T) {}

// Empty buf through repeated reads into fub.
// The initial contents of buf corresponds to the string s.
func empty(t *testing.T, testname string, buf *Buffer, s string, fub []byte) {}

func TestBasicOperations(t *testing.T) {}

func TestLargeStringWrites(t *testing.T) {}

func TestLargeByteWrites(t *testing.T) {}

func TestLargeStringReads(t *testing.T) {}

func TestLargeByteReads(t *testing.T) {}

func TestMixedReadsAndWrites(t *testing.T) {}

func TestCapWithPreallocatedSlice(t *testing.T) {}

func TestCapWithSliceAndWrittenData(t *testing.T) {}

func TestNil(t *testing.T) {}

func TestReadFrom(t *testing.T) {}

type panicReader

func (r panicReader) Read(p []byte) (int, error) {}

// Make sure that an empty Buffer remains empty when
// it is "grown" before a Read that panics
func TestReadFromPanicReader(t *testing.T) {}

func TestReadFromNegativeReader(t *testing.T) {}

func TestWriteTo(t *testing.T) {}

func TestWriteAppend(t *testing.T) {}

func TestRuneIO(t *testing.T) {}

func TestWriteInvalidRune(t *testing.T) {}

func TestNext(t *testing.T) {}

var readBytesTests

func TestReadBytes(t *testing.T) {}

func TestReadString(t *testing.T) {}

func BenchmarkReadString(b *testing.B) {}

func TestGrow(t *testing.T) {}

func TestGrowOverflow(t *testing.T) {}

// Was a bug: used to give EOF reading empty slice at EOF.
func TestReadEmptyAtEOF(t *testing.T) {}

func TestUnreadByte(t *testing.T) {}

// Tests that we occasionally compact. Issue 5154.
func TestBufferGrowth(t *testing.T) {}

func BenchmarkWriteByte(b *testing.B) {}

func BenchmarkWriteRune(b *testing.B) {}

// From Issue 5154.
func BenchmarkBufferNotEmptyWriteRead(b *testing.B) {}

// Check that we don't compact too often. From Issue 5154.
func BenchmarkBufferFullSmallReads(b *testing.B) {}

func BenchmarkBufferWriteBlock(b *testing.B) {}

func BenchmarkBufferAppendNoCopy(b *testing.B) {}