xref: /aosp_15_r20/external/golang-protobuf/internal/testprotos/nullable/methods_test.go (revision 1c12ee1efe575feb122dbf939ff15148a3b3e8f2)
1*1c12ee1eSDan Willemsen// Copyright 2021 The Go Authors. All rights reserved.
2*1c12ee1eSDan Willemsen// Use of this source code is governed by a BSD-style
3*1c12ee1eSDan Willemsen// license that can be found in the LICENSE file.
4*1c12ee1eSDan Willemsen
5*1c12ee1eSDan Willemsen// For messages which do not provide legacy Marshal and Unmarshal methods,
6*1c12ee1eSDan Willemsen// only test compatibility with the Marshal/Unmarshal functionality with
7*1c12ee1eSDan Willemsen// pure protobuf reflection since there is no support for nullable fields
8*1c12ee1eSDan Willemsen// in the table-driven implementation.
9*1c12ee1eSDan Willemsen//go:build protoreflect
10*1c12ee1eSDan Willemsen// +build protoreflect
11*1c12ee1eSDan Willemsen
12*1c12ee1eSDan Willemsenpackage nullable
13*1c12ee1eSDan Willemsen
14*1c12ee1eSDan Willemsenimport "google.golang.org/protobuf/runtime/protoimpl"
15*1c12ee1eSDan Willemsen
16*1c12ee1eSDan Willemsenfunc init() {
17*1c12ee1eSDan Willemsen	methodTestProtos = append(methodTestProtos,
18*1c12ee1eSDan Willemsen		protoimpl.X.ProtoMessageV2Of((*Proto2)(nil)).ProtoReflect().Type(),
19*1c12ee1eSDan Willemsen		protoimpl.X.ProtoMessageV2Of((*Proto3)(nil)).ProtoReflect().Type(),
20*1c12ee1eSDan Willemsen	)
21*1c12ee1eSDan Willemsen}
22