Skip to content

Commit f6d8b21

Browse files
authored
test(gengapic): remove typeptr (#1686)
1 parent d903b0d commit f6d8b21

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

internal/gengapic/gengapic_test.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1433,9 +1433,9 @@ func TestInsertDynamicRequestHeaders_Ordering(t *testing.T) {
14331433
inputType := &descriptorpb.DescriptorProto{
14341434
Name: proto.String("InputType"),
14351435
Field: []*descriptorpb.FieldDescriptorProto{
1436-
{Name: proto.String("field1"), Type: typePtr(descriptorpb.FieldDescriptorProto_TYPE_STRING)},
1437-
{Name: proto.String("field2"), Type: typePtr(descriptorpb.FieldDescriptorProto_TYPE_STRING)},
1438-
{Name: proto.String("field3"), Type: typePtr(descriptorpb.FieldDescriptorProto_TYPE_STRING)},
1436+
{Name: proto.String("field1"), Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum()},
1437+
{Name: proto.String("field2"), Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum()},
1438+
{Name: proto.String("field3"), Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum()},
14391439
},
14401440
}
14411441
g.descInfo.Type[".InputType"] = inputType
@@ -1518,10 +1518,6 @@ func TestInsertDynamicRequestHeaders_Ordering(t *testing.T) {
15181518
}
15191519
}
15201520

1521-
func typePtr(t descriptorpb.FieldDescriptorProto_Type) *descriptorpb.FieldDescriptorProto_Type {
1522-
return &t
1523-
}
1524-
15251521
func setHTTPOption(o *descriptorpb.MethodOptions, pattern string) {
15261522
proto.SetExtension(o, annotations.E_Http, &annotations.HttpRule{
15271523
Pattern: &annotations.HttpRule_Get{

0 commit comments

Comments
 (0)