• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package protobuf_unittest;
2
3option java_package = "com.google.protobuf";
4option java_outer_classname = "EnumValidity";
5
6enum E {
7  default = 1; // test java keyword renaming
8  FOO = 2;
9  BAR = 3;
10  BAZ = 4;
11}
12
13message M {
14  optional E optional_e = 1;
15  optional E default_e = 2 [ default = BAZ ];
16  repeated E repeated_e = 3;
17  repeated E packed_e = 4 [ packed = true ];
18  repeated E repeated_e2 = 5;
19  repeated E packed_e2 = 6 [ packed = true ];
20  repeated E repeated_e3 = 7;
21  repeated E packed_e3 = 8 [ packed = true ];
22}
23
24message Alt {
25  optional E repeated_e2_as_optional = 5;
26  repeated E packed_e2_as_non_packed = 6;
27  repeated E non_packed_e3_as_packed = 7 [ packed = true ];
28}
29