Commit eaff83b9 authored by Shawn Smith's avatar Shawn Smith Committed by Brad Fitzpatrick

encoding/hex: add Decode error test case

R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/46880043
parent b38da05a
...@@ -82,6 +82,7 @@ type errTest struct { ...@@ -82,6 +82,7 @@ type errTest struct {
var errTests = []errTest{ var errTests = []errTest{
{"0", "encoding/hex: odd length hex string"}, {"0", "encoding/hex: odd length hex string"},
{"0g", "encoding/hex: invalid byte: U+0067 'g'"}, {"0g", "encoding/hex: invalid byte: U+0067 'g'"},
{"00gg", "encoding/hex: invalid byte: U+0067 'g'"},
{"0\x01", "encoding/hex: invalid byte: U+0001"}, {"0\x01", "encoding/hex: invalid byte: U+0001"},
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment