style: use thelper (#16777)

This commit is contained in:
Jacob Gadikian
2023-07-03 13:33:05 +00:00
committed by GitHub
parent e4e7922cea
commit f0aec3f30d
114 changed files with 359 additions and 149 deletions
+2
View File
@@ -21,6 +21,7 @@ func TestCodec(t *testing.T) {
}
func testCodec(t *testing.T, spec testutil.TestFieldSpec) {
t.Helper()
t.Run(fmt.Sprintf("%s %v", spec.FieldName, false), func(t *testing.T) {
testCodecNT(t, spec.FieldName, spec.Gen, false)
})
@@ -30,6 +31,7 @@ func testCodec(t *testing.T, spec testutil.TestFieldSpec) {
}
func testCodecNT(t *testing.T, fname protoreflect.Name, generator *rapid.Generator[any], nonTerminal bool) {
t.Helper()
cdc, err := testutil.MakeTestCodec(fname, nonTerminal)
assert.NilError(t, err)
rapid.Check(t, func(t *rapid.T) {
+1
View File
@@ -275,6 +275,7 @@ func TestDurationCompare(t *testing.T) {
}
func encodeValue(t *testing.T, cdc ormfield.Codec, val protoreflect.Value) []byte {
t.Helper()
buf := &bytes.Buffer{}
assert.NilError(t, cdc.Encode(val, buf))
return buf.Bytes()