mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
trivial bug: []byte is special but [3]byte is not.
modify a test to verify the fix. R=rsc CC=golang-dev https://golang.org/cl/183090
This commit is contained in:
parent
bcabc99a92
commit
5a44338159
2 changed files with 7 additions and 5 deletions
|
|
@ -240,11 +240,12 @@ func TestValueError(t *testing.T) {
|
|||
func TestArray(t *testing.T) {
|
||||
type Type5 struct {
|
||||
a [3]string
|
||||
b [3]byte
|
||||
}
|
||||
type Type6 struct {
|
||||
a [2]string // can't hold t5.a
|
||||
}
|
||||
t5 := Type5{[3]string{"hello", ",", "world"}}
|
||||
t5 := Type5{[3]string{"hello", ",", "world"}, [3]byte{1, 2, 3}}
|
||||
var t5p Type5
|
||||
if err := encAndDec(t5, &t5p); err != nil {
|
||||
t.Error(err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue