25 float req_float = 1010.0f;
28 double req_double = 1013.0;
29 char* req_string =
"1014";
31 static int32_t req_substuff = 1016;
32 SubMessage req_submsg = {
"1016", &req_substuff};
35 pb_byte_t req_fbytes[4] = {
'1',
'0',
'1',
'9'};
40 int32_t rep_int32[5] = {0, 0, 0, 0, -2001};
41 int64_t rep_int64[5] = {0, 0, 0, 0, -2002};
42 uint32_t rep_uint32[5] = {0, 0, 0, 0, 2003};
43 uint64_t rep_uint64[5] = {0, 0, 0, 0, 2004};
44 int32_t rep_sint32[5] = {0, 0, 0, 0, -2005};
45 int64_t rep_sint64[5] = {0, 0, 0, 0, -2006};
46 bool rep_bool[5] = {
false,
false,
false,
false,
true};
47 uint32_t rep_fixed32[5] = {0, 0, 0, 0, 2008};
48 int32_t rep_sfixed32[5] = {0, 0, 0, 0, -2009};
49 float rep_float[5] = {0, 0, 0, 0, 2010.0f};
50 uint64_t rep_fixed64[5] = {0, 0, 0, 0, 2011};
51 int64_t rep_sfixed64[5] = {0, 0, 0, 0, -2012};
52 double rep_double[5] = {0, 0, 0, 0, 2013.0f};
53 char* rep_string[5] = {
"",
"",
"",
"",
"2014"};
55 pb_bytes_array_t *rep_bytes[5]= {
NULL,
NULL,
NULL,
NULL, (pb_bytes_array_t*)&rep_bytes_4};
56 static int32_t rep_sub2zero = 0;
57 static int32_t rep_substuff2 = 2016;
58 static uint32_t rep_substuff3 = 2016;
59 SubMessage rep_submsg[5] = {{
"", &rep_sub2zero},
63 {
"2016", &rep_substuff2, &rep_substuff3}};
65 EmptyMessage rep_emptymsg[5] = {{0}, {0}, {0}, {0}, {0}};
66 pb_byte_t rep_fbytes[5][4] = {{0}, {0}, {0}, {0}, {
'2',
'0',
'1',
'9'}};
67 int32_t rep_farray[5] = {0, 0, 0, 0, 2040};
68 uint32_t rep_farray2[3] = {0, 0, 2095};
80 float opt_float = 3050.0f;
83 double opt_double = 3053.0;
84 char* opt_string =
"3054";
86 static int32_t opt_substuff = 3056;
87 SubMessage opt_submsg = {
"3056", &opt_substuff};
90 pb_byte_t opt_fbytes[4] = {
'3',
'0',
'5',
'9'};
92 static int32_t oneof_substuff = 4059;
93 SubMessage oneof_msg1 = {
"4059", &oneof_substuff};
95 NonZeroBasedEnum opt_non_zero_based_enum = NonZeroBasedEnum_Three;
98 static int32_t int32_min = INT32_MIN;
99 static int32_t int32_max = INT32_MAX;
101 static uint32_t uint32_max = UINT32_MAX;
102 static int64_t int64_min = INT64_MIN;
103 static int64_t int64_max = INT64_MAX;
105 static uint64_t uint64_max = UINT64_MAX;
108 static int32_t largetag = 1001;
109 Limits req_limits = {&int32_min, &int32_max,
110 &uint32_min, &uint32_max,
111 &int64_min, &int64_max,
112 &uint64_min, &uint64_max,
113 &enum_min, &enum_max,
119 DescriptorSize8 req_ds8 = {&first, &second};
122 static int8_t req_int8 = -128;
123 static uint8_t req_uint8 = 255;
124 static int8_t req_sint8 = -128;
125 static int16_t req_int16 = -32768;
127 static int16_t req_sint16 = -32768;
128 IntSizes req_intsizes = {&req_int8, &req_uint8, &req_sint8,
129 &req_int16, &req_uint16, &req_sint16};
148 alltypes.
req_bytes = (pb_bytes_array_t*)&req_bytes;
151 alltypes.req_emptymsg = &req_emptymsg;
152 alltypes.req_fbytes = &req_fbytes;
153 alltypes.req_limits = &req_limits;
154 alltypes.req_ds8 = &req_ds8;
155 alltypes.req_intsizes = &req_intsizes;
174 alltypes.rep_emptymsg_count = 5; alltypes.rep_emptymsg = rep_emptymsg;
175 alltypes.rep_fbytes_count = 5; alltypes.rep_fbytes = rep_fbytes;
176 alltypes.rep_farray = &rep_farray;
177 alltypes.rep_farray2 = &rep_farray2;
196 alltypes.
opt_bytes = (pb_bytes_array_t*)&opt_bytes;
199 alltypes.opt_emptymsg = &opt_emptymsg;
200 alltypes.opt_fbytes = &opt_fbytes;
202 alltypes.which_oneof = AllTypes_oneof_msg1_tag;
203 alltypes.oneof.oneof_msg1 = &oneof_msg1;
205 alltypes.opt_non_zero_based_enum = &opt_non_zero_based_enum;