Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exercise both in-memory BufReader and file-backed FileReader in Decbu…
…f tests. This revealed two differences in behaviour between BufReader and FileReader: * creating a FileReader for an empty file would fail with an error, whereas creating a BufReader for an empty buffer would succeed (and subsequent reads would fail with an 'invalid size' error) * reading from a FileReader that had reached the end of the file would return a nil byte slice, whereas reading from a BufReader that had reached the end of its buffer would return an empty byte slice Now, both implementations will fail at creation if given an empty source file / buffer, and both will return an empty slice if reading from the end of the source file / buffer.
- Loading branch information