• Agniva De Sarker's avatar
    encoding/hex: improve tests · 98276d6a
    Agniva De Sarker authored
    The tests for error scenarios were done by manually checking
    error strings. Improved them by checking the actual error type
    instead of just the string.
    
    Printing the actual error in case of failure instead of a
    generic string.
    
    Also added a new scenario with both an invalid byte and an
    invalid length string to verify that the length is checked first
    before doing any computation.
    
    Change-Id: Ic2a19a6d6058912632d597590186ee2d8348cb45
    Reviewed-on: https://go-review.googlesource.com/55256Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    Run-TryBot: Ian Lance Taylor <iant@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    98276d6a
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...