mirror of https://github.com/golang/go.git
encoding/binary: add missing test helper calls
Various functions in binary_test.go were missing some t.Helper() calls,
so this adds them in.
Change-Id: I0e5894e3c3cf72627203694a32adca51fe1563f5
GitHub-Last-Rev: b28c9255b3
GitHub-Pull-Request: golang/go#63897
Reviewed-on: https://go-review.googlesource.com/c/go/+/539135
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: qiu laidongfeng2 <2645477756@qq.com>
Auto-Submit: Keith Randall <khr@golang.org>
This commit is contained in:
parent
fc5073bc15
commit
d567ea652a
|
|
@ -115,6 +115,7 @@ var res = []int32{0x01020304, 0x05060708}
|
|||
var putbuf = []byte{0, 0, 0, 0, 0, 0, 0, 0}
|
||||
|
||||
func checkResult(t *testing.T, dir string, order ByteOrder, err error, have, want any) {
|
||||
t.Helper()
|
||||
if err != nil {
|
||||
t.Errorf("%v %v: %v", dir, order, err)
|
||||
return
|
||||
|
|
@ -183,6 +184,7 @@ var decoders = []struct {
|
|||
}
|
||||
|
||||
func testRead(t *testing.T, order ByteOrder, b []byte, s1 any) {
|
||||
t.Helper()
|
||||
for _, dec := range decoders {
|
||||
t.Run(dec.name, func(t *testing.T) {
|
||||
var s2 Struct
|
||||
|
|
@ -193,6 +195,7 @@ func testRead(t *testing.T, order ByteOrder, b []byte, s1 any) {
|
|||
}
|
||||
|
||||
func testWrite(t *testing.T, order ByteOrder, b []byte, s1 any) {
|
||||
t.Helper()
|
||||
for _, enc := range encoders {
|
||||
t.Run(enc.name, func(t *testing.T) {
|
||||
buf, err := enc.fn(order, s1)
|
||||
|
|
|
|||
Loading…
Reference in New Issue