Merge pull request #13219 from brahmaroutu/gccgo_compile_issue

fix to gccgo compilation error
Upstream-commit: 472538bee00d0c665ed43ff1a3db7531a8e28d65
Component: engine
This commit is contained in:
Doug Davis
2015-05-18 20:43:47 -04:00

View File

@ -43,10 +43,9 @@ func TestReaderErrWrapperReadOnError(t *testing.T) {
}
func TestReaderErrWrapperRead(t *testing.T) {
called := false
reader := strings.NewReader("a string reader.")
wrapper := NewReaderErrWrapper(reader, func() {
called = true // Should not be called
t.Fatalf("readErrWrapper should not have called the anonymous function on failure")
})
// Read 20 byte (should be ok with the string above)
num, err := wrapper.Read(make([]byte, 20))