Overview
Comment: | Renamed BlockReader to SizedReader, modified ioutil tests for 100% code coverage |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
11d1c50cd5867c495edb33f76a2fd7c8 |
User & Date: | spaskalev on 2014-12-23 20:53:40 |
Other Links: | manifest | tags |
Context
2014-12-24
| ||
08:24 | Added an explicit copyright notice in the code. check-in: ffd1ab7b0c user: spaskalev tags: trunk | |
2014-12-23
| ||
20:53 | Renamed BlockReader to SizedReader, modified ioutil tests for 100% code coverage check-in: 11d1c50cd5 user: spaskalev tags: trunk | |
19:18 | Fixing ioutil tests to compile :) check-in: b0ff11dfcd user: spaskalev tags: trunk | |
Changes
Modified src/0dev.org/ioutil/ioutil.go from [f63ac1dff8] to [98f8caa018].
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | - - - - + + + + | type ReaderFunc func([]byte) (int, error) // Delegates the call to the WriterFunc while implementing io.Reader func (r ReaderFunc) Read(b []byte) (int, error) { return r(b) } |
︙ |
Modified src/0dev.org/ioutil/ioutil_test.go from [a857b5c640] to [f071d3739a].
︙ | |||
49 50 51 52 53 54 55 | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | - + | func TestBlockReader(t *testing.T) { var ( input []byte = []byte{0, 1, 2, 3, 4, 5, 6, 7} output []byte = make([]byte, 16) reader *bytes.Reader = bytes.NewReader(input) |
︙ | |||
80 81 82 83 84 85 86 | 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | - + | t.Error("Invalid read count from MinReader", count) } 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 |
Modified src/0dev.org/predictor/predictor.go from [625ed7e8bc] to [1bc0c5d728].
︙ | |||
117 118 119 120 121 122 123 | 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | - + | // Returns an io.Reader implementation that wraps the provided io.Reader // and decompresses data according to the predictor algorithm func Decompressor(reader io.Reader) io.Reader { var ctx context ctx.input = make([]byte, 0, 8) |
︙ |