Herbie Ong | 6e67a1d | 2018-12-26 15:57:16 -0800 | [diff] [blame^] | 1 | // Copyright 2018 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | // Different proto type definitions for testing the Types registry. |
| 6 | syntax = "proto2"; |
| 7 | |
| 8 | package testprotos; |
| 9 | option go_package = "github.com/golang/protobuf/v2/reflect/protoregistry/testprotos"; |
| 10 | |
| 11 | message Message1 { |
| 12 | extensions 10 to max; |
| 13 | } |
| 14 | |
| 15 | message Message2 {} |
| 16 | |
| 17 | message Message3 {} |
| 18 | |
| 19 | enum Enum1 { |
| 20 | ONE = 1; |
| 21 | } |
| 22 | |
| 23 | enum Enum2 { |
| 24 | UNO = 1; |
| 25 | } |
| 26 | |
| 27 | enum Enum3 { |
| 28 | YI = 1; |
| 29 | } |
| 30 | |
| 31 | extend Message1 { |
| 32 | optional string string_field = 11; |
| 33 | optional Enum1 enum_field = 12; |
| 34 | optional Message2 message_field = 13; |
| 35 | } |
| 36 | |
| 37 | message Message4 { |
| 38 | optional bool bool_field = 30; |
| 39 | |
| 40 | extend Message1 { |
| 41 | optional Message2 message_field = 21; |
| 42 | optional Enum1 enum_field = 22; |
| 43 | optional string string_field = 23; |
| 44 | } |
| 45 | } |