go/src/io/io_test.go

type Buffer

func TestCopy(t *testing.T) {}

func TestCopyNegative(t *testing.T) {}

func TestCopyBuffer(t *testing.T) {}

func TestCopyBufferNil(t *testing.T) {}

func TestCopyReadFrom(t *testing.T) {}

func TestCopyWriteTo(t *testing.T) {}

type writeToChecker

func (wt *writeToChecker) WriteTo(w Writer) (int64, error) {}

// It's preferable to choose WriterTo over ReaderFrom, since a WriterTo can issue one large write,
// while the ReaderFrom must read until EOF, potentially allocating when running out of buffer.
// Make sure that we choose WriterTo when both are implemented.
func TestCopyPriority(t *testing.T) {}

type zeroErrReader

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

type errWriter

func (w errWriter) Write([]byte) (int, error) {}

// In case a Read results in an error with non-zero bytes read, and
// the subsequent Write also results in an error, the error from Write
// is returned, as it is the one that prevented progressing further.
func TestCopyReadErrWriteErr(t *testing.T) {}

func TestCopyN(t *testing.T) {}

func TestCopyNReadFrom(t *testing.T) {}

func TestCopyNWriteTo(t *testing.T) {}

func BenchmarkCopyNSmall(b *testing.B) {}

func BenchmarkCopyNLarge(b *testing.B) {}

type noReadFrom

func (w *noReadFrom) Write(p []byte) (n int, err error) {}

type wantedAndErrReader

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

func TestCopyNEOF(t *testing.T) {}

func TestReadAtLeast(t *testing.T) {}

type dataAndErrorBuffer

func (r *dataAndErrorBuffer) Read(p []byte) (n int, err error) {}

func TestReadAtLeastWithDataAndEOF(t *testing.T) {}

func TestReadAtLeastWithDataAndError(t *testing.T) {}

func testReadAtLeast(t *testing.T, rb ReadWriter) {}

func TestTeeReader(t *testing.T) {}

func TestSectionReader_ReadAt(t *testing.T) {}

func TestSectionReader_Seek(t *testing.T) {}

func TestSectionReader_Size(t *testing.T) {}

func TestSectionReader_Max(t *testing.T) {}

type largeWriter

func (w largeWriter) Write(p []byte) (int, error) {}

func TestCopyLargeWriter(t *testing.T) {}

func TestNopCloserWriterToForwarding(t *testing.T) {}

func TestOffsetWriter_Seek(t *testing.T) {}

func TestOffsetWriter_WriteAt(t *testing.T) {}

func TestWriteAt_PositionPriorToBase(t *testing.T) {}

func TestOffsetWriter_Write(t *testing.T) {}