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 5syntax = "proto2"; 6 7package goproto.protoc.proto2; 8 9option go_package = "google.golang.org/protobuf/cmd/protoc-gen-go/testdata/proto2"; 10 11// EnumType1 comment. 12enum EnumType1 { 13 // EnumType1_ONE comment. 14 ONE = 1; 15 // EnumType1_TWO comment. 16 TWO = 2; 17} 18 19enum EnumType2 { 20 option allow_alias = true; 21 duplicate1 = 1; 22 duplicate2 = 1; 23 24 reserved "RESERVED1"; 25 reserved "RESERVED2"; 26 reserved 2, 3; 27} 28 29message EnumContainerMessage1 { 30 optional EnumType2 default_duplicate1 = 1 [default=duplicate1]; 31 optional EnumType2 default_duplicate2 = 2 [default=duplicate2]; 32 33 // NestedEnumType1A comment. 34 enum NestedEnumType1A { 35 // NestedEnumType1A_VALUE comment. 36 NESTED_1A_VALUE = 0; 37 } 38 39 enum NestedEnumType1B { 40 NESTED_1B_VALUE = 0; 41 } 42 43 message EnumContainerMessage2 { 44 // NestedEnumType2A comment. 45 enum NestedEnumType2A { 46 // NestedEnumType2A_VALUE comment. 47 NESTED_2A_VALUE = 0; 48 } 49 50 enum NestedEnumType2B { 51 NESTED_2B_VALUE = 0; 52 } 53 } 54} 55