]> Cypherpunks repositories - gostls13.git/commitdiff
encoding/hex: add Decode error test case
authorShawn Smith <shawn.p.smith@gmail.com>
Thu, 2 Jan 2014 18:34:21 +0000 (10:34 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 2 Jan 2014 18:34:21 +0000 (10:34 -0800)
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/46880043

src/pkg/encoding/hex/hex_test.go

index cef4ef41b711aeb455a1ca0a45e9fd1183007e4b..b969636cd5e6a330df08f03964f06df2fb1024db 100644 (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"},
 }