Fixes #15923
Change-Id: I3e56564365086ceb0bfc15db61db6fb446ab7448
Reviewed-on: https://go-review.googlesource.com/23760
Reviewed-by: Sebastien Binet <seb.binet@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
if s != want {
t.Errorf("constructed struct = %s, want %s", s, want)
}
+ const stStr = `struct { S string "s"; X uint8 "x"; Y uint64; Z [3]uint16 }`
+ if got, want := st.String(), stStr; got != want {
+ t.Errorf("StructOf(fields).String()=%q, want %q", got, want)
+ }
// check the size, alignment and field offsets
stt := TypeOf(struct {
}
typ.str = resolveReflectName(newName(str, "", "", false))
+ typ.tflag = 0
typ.hash = hash
typ.size = size
typ.align = typalign