24 memset(&alltypes, 0xAA,
sizeof(alltypes));
30 if (mode == 0 || mode == 1)
55 TEST(
memcmp(alltypes.req_fbytes,
"1019", 4) == 0);
83 TEST(alltypes.rep_emptymsg_count == 5);
84 TEST(alltypes.rep_fbytes_count == 5);
85 TEST(alltypes.rep_fbytes[0][0] == 0 && alltypes.rep_fbytes[0][3] == 0);
86 TEST(
memcmp(alltypes.rep_fbytes[4],
"2019", 4) == 0);
88 TEST(alltypes.rep_farray[0] == 0 && alltypes.rep_farray[4] == 2040);
89 TEST(alltypes.rep_farray2[0] == 0 && alltypes.rep_farray2[2] == 2095);
91 TEST(alltypes.req_limits.int32_min == INT32_MIN);
92 TEST(alltypes.req_limits.int32_max == INT32_MAX);
93 TEST(alltypes.req_limits.uint32_min == 0);
94 TEST(alltypes.req_limits.uint32_max == UINT32_MAX);
95 TEST(alltypes.req_limits.int64_min == INT64_MIN);
96 TEST(alltypes.req_limits.int64_max == INT64_MAX);
97 TEST(alltypes.req_limits.uint64_min == 0);
98 TEST(alltypes.req_limits.uint64_max == UINT64_MAX);
101 TEST(alltypes.req_limits.largetag == 1001);
103 TEST(alltypes.req_ds8.first == 9991);
104 TEST(alltypes.req_ds8.second == 9992);
106 TEST(alltypes.req_intsizes.req_int8 == -128);
107 TEST(alltypes.req_intsizes.req_uint8 == 255);
108 TEST(alltypes.req_intsizes.req_sint8 == -128);
109 TEST(alltypes.req_intsizes.req_int16 == -32768);
110 TEST(alltypes.req_intsizes.req_uint16 == 65535);
111 TEST(alltypes.req_intsizes.req_sint16 == -32768);
157 TEST(alltypes.has_opt_emptymsg ==
false);
158 TEST(alltypes.has_opt_fbytes ==
false);
159 TEST(
memcmp(alltypes.opt_fbytes,
"4059", 4) == 0);
161 TEST(alltypes.which_oneof == 0);
163 TEST(alltypes.has_opt_non_zero_based_enum ==
false);
164 TEST(alltypes.opt_non_zero_based_enum == NonZeroBasedEnum_Two);
209 TEST(alltypes.has_opt_emptymsg ==
true);
210 TEST(alltypes.has_opt_fbytes ==
true);
211 TEST(
memcmp(alltypes.opt_fbytes,
"3059", 4) == 0);
213 TEST(alltypes.which_oneof == AllTypes_oneof_msg1_tag);
214 TEST(
strcmp(alltypes.oneof.oneof_msg1.substuff1,
"4059") == 0);
215 TEST(alltypes.oneof.oneof_msg1.substuff2 == 4059);
216 TEST(alltypes.oneof.oneof_msg1.substuff3 == 3);
218 TEST(alltypes.has_opt_non_zero_based_enum ==
true);
219 TEST(alltypes.opt_non_zero_based_enum == NonZeroBasedEnum_Three);
268 TEST(alltypes.rep_emptymsg_count == 0);
269 TEST(alltypes.rep_fbytes_count == 0);
270 TEST(alltypes.rep_farray[0] == 0 && alltypes.rep_farray[4] == 0);
292 TEST(alltypes.has_opt_emptymsg ==
false);
293 TEST(alltypes.has_opt_fbytes ==
false);
295 TEST(alltypes.which_oneof == 0);
297 TEST(alltypes.has_opt_non_zero_based_enum ==
false);
size_t fread(void *__restrict ptr, size_t size, size_t nmemb, FILE *__restrict stream)