• Mark Ryan's avatar
    encoding: fix endless loop in TestDecoderBuffering · 3e0c21e0
    Mark Ryan authored
    The ascii85, base32 and base64 packages all contain a test called
    TestDecoderBuffering.  Each of these tests contain a loop that ignores
    the error returned from the Read method of their decoders.  The result
    being that the tests loop for ever if the decoders actually return an
    error.  This commit fixes the issue by terminating the loops if an error
    occurs and failing the tests with a suitable error message.
    
    Change-Id: Idb385673cf9f3f6f8befe4288b4be366ab0985fd
    Reviewed-on: https://go-review.googlesource.com/46010Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
    Run-TryBot: Ian Lance Taylor <iant@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    3e0c21e0
base32_test.go 15.5 KB