@@ -43,6 +43,7 @@ import (
4343//
4444// It dedents the string before parsing.
4545func ParseProtoStrings (t * testing.T , src map [string ]string ) map [string ]protoreflect.FileDescriptor {
46+ t .Helper ()
4647 filenames := []string {}
4748 for k , v := range src {
4849 filenames = append (filenames , k )
@@ -85,6 +86,7 @@ func ParseProtoStrings(t *testing.T, src map[string]string) map[string]protorefl
8586// It adds the `syntax = "proto3";` line to the beginning of the file and
8687// chooses a filename, and then calls ParseProtoStrings.
8788func ParseProto3String (t * testing.T , src string ) protoreflect.FileDescriptor {
89+ t .Helper ()
8890 return ParseProtoStrings (t , map [string ]string {
8991 "test.proto" : fmt .Sprintf (
9092 "syntax = \" proto3\" ;\n \n %s" ,
@@ -98,6 +100,7 @@ func ParseProto3String(t *testing.T, src string) protoreflect.FileDescriptor {
98100//
99101// It dedents the string before parsing.
100102func ParseProtoString (t * testing.T , src string ) protoreflect.FileDescriptor {
103+ t .Helper ()
101104 return ParseProtoStrings (t , map [string ]string {"test.proto" : src })["test.proto" ]
102105}
103106
@@ -107,6 +110,7 @@ func ParseProtoString(t *testing.T, src string) protoreflect.FileDescriptor {
107110// It parses the template using Go's text/template Parse function, and then
108111// calls ParseProto3String.
109112func ParseProto3Tmpl (t * testing.T , src string , data interface {}) protoreflect.FileDescriptor {
113+ t .Helper ()
110114 return ParseProto3Tmpls (t , map [string ]string {
111115 "test.proto" : src ,
112116 }, data )["test.proto" ]
@@ -118,6 +122,7 @@ func ParseProto3Tmpl(t *testing.T, src string, data interface{}) protoreflect.Fi
118122// It parses the template using Go's text/template Parse function, and then
119123// calls ParseProto3Strings.
120124func ParseProto3Tmpls (t * testing.T , srcs map [string ]string , data interface {}) map [string ]protoreflect.FileDescriptor {
125+ t .Helper ()
121126 strs := map [string ]string {}
122127 for fn , src := range srcs {
123128 // Create a new template object.
0 commit comments