encoding/hex: add Decode error test case

R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/46880043
This commit is contained in:
Shawn Smith 2014-01-02 10:34:21 -08:00 committed by Brad Fitzpatrick
parent b38da05ab1
commit eaff83b98e

View file

@ -82,6 +82,7 @@ type errTest struct {
var errTests = []errTest{
{"0", "encoding/hex: odd length hex string"},
{"0g", "encoding/hex: invalid byte: U+0067 'g'"},
{"00gg", "encoding/hex: invalid byte: U+0067 'g'"},
{"0\x01", "encoding/hex: invalid byte: U+0001"},
}