}
+enum HugeEnum {
+ Negative = -2147483647; /* protoc doesn't accept -2147483648 here */
+ Positive = 2147483647;
+}
+
+message Limits {
+ required int32 int32_min = 1 [default = 2147483647];
+ required int32 int32_max = 2 [default = -2147483647];
+ required uint32 uint32_min = 3 [default = 4294967295];
+ required uint32 uint32_max = 4 [default = 0];
+ required int64 int64_min = 5 [default = 9223372036854775807];
+ required int64 int64_max = 6 [default = -9223372036854775807];
+ required uint64 uint64_min = 7 [default = 18446744073709551615];
+ required uint64 uint64_max = 8 [default = 0];
+ required HugeEnum enum_min = 9 [default = Positive];
+ required HugeEnum enum_max = 10 [default = Negative];
+}
+
enum MyEnum {
Zero = 0;
First = 1;
required EmptyMessage req_emptymsg = 18;
- repeated int32 rep_int32 = 21;
- repeated int64 rep_int64 = 22;
- repeated uint32 rep_uint32 = 23;
- repeated uint64 rep_uint64 = 24;
- repeated sint32 rep_sint32 = 25;
- repeated sint64 rep_sint64 = 26;
- repeated bool rep_bool = 27;
+ repeated int32 rep_int32 = 21 [packed = true];
+ repeated int64 rep_int64 = 22 [packed = true];
+ repeated uint32 rep_uint32 = 23 [packed = true];
+ repeated uint64 rep_uint64 = 24 [packed = true];
+ repeated sint32 rep_sint32 = 25 [packed = true];
+ repeated sint64 rep_sint64 = 26 [packed = true];
+ repeated bool rep_bool = 27 [packed = true];
- repeated fixed32 rep_fixed32 = 28;
- repeated sfixed32 rep_sfixed32= 29;
- repeated float rep_float = 30;
+ repeated fixed32 rep_fixed32 = 28 [packed = true];
+ repeated sfixed32 rep_sfixed32= 29 [packed = true];
+ repeated float rep_float = 30 [packed = true];
- repeated fixed64 rep_fixed64 = 31;
- repeated sfixed64 rep_sfixed64= 32;
- repeated double rep_double = 33;
+ repeated fixed64 rep_fixed64 = 31 [packed = true];
+ repeated sfixed64 rep_sfixed64= 32 [packed = true];
+ repeated double rep_double = 33 [packed = true];
repeated string rep_string = 34;
repeated bytes rep_bytes = 35;
repeated SubMessage rep_submsg = 36;
- repeated MyEnum rep_enum = 37;
+ repeated MyEnum rep_enum = 37 [packed = true];
repeated EmptyMessage rep_emptymsg = 38;
optional int32 opt_int32 = 41 [default = 4041];
optional MyEnum opt_enum = 57 [default = Second];
optional EmptyMessage opt_emptymsg = 58;
+ // Check that extreme integer values are handled correctly
+ required Limits req_limits = 98;
+
// Just to make sure that the size of the fields has been calculated
// properly, i.e. otherwise a bug in last field might not be detected.
required int32 end = 99;