@@ -51,11 +51,11 @@ var ( input []byte = []byte{0, 1, 2, 3, 4, 5, 6, 7} output []byte = make([]byte, 16) reader *bytes.Reader = bytes.NewReader(input) - min io.Reader = BlockReader(reader, 4) + min io.Reader = SizedReader(reader, 4) ) // Expecting a read count of 2 count, err := min.Read(output[:2]) if count != 2 { @@ -82,13 +82,13 @@ if err != nil { t.Error("Unexpected error from MinReader", err) } // Expecting a read count of 0 with an EOF as the buffer should be empty - count, err = min.Read(output[:4]) + count, err = min.Read(output[:1]) if count != 0 { t.Error("Invalid read count from MinReader", count) } if err != io.EOF { t.Error("Unexpected error from MinReader", err) } }