17 memset(&alltypes, 0xAA,
sizeof(alltypes));
46 TEST(alltypes.req_fbytes &&
memcmp(alltypes.req_fbytes,
"1019", 4) == 0);
74 TEST(alltypes.rep_emptymsg_count == 5);
75 TEST(alltypes.rep_fbytes_count == 5);
76 TEST(alltypes.rep_fbytes[0][0] == 0 && alltypes.rep_fbytes[0][3] == 0);
77 TEST(
memcmp(alltypes.rep_fbytes[4],
"2019", 4) == 0);
78 TEST(alltypes.rep_farray && (*alltypes.rep_farray)[0] == 0 && (*alltypes.rep_farray)[4] == 2040);
79 TEST(alltypes.rep_farray2 && (*alltypes.rep_farray2)[0] == 0 && (*alltypes.rep_farray2)[2] == 2095);
105 TEST(alltypes.which_oneof == 0);
107 TEST(alltypes.opt_non_zero_based_enum ==
NULL);
133 TEST(alltypes.opt_emptymsg);
134 TEST(alltypes.opt_fbytes &&
memcmp(alltypes.opt_fbytes,
"3059", 4) == 0);
136 TEST(alltypes.which_oneof == AllTypes_oneof_msg1_tag);
137 TEST(alltypes.oneof.oneof_msg1 &&
strcmp(alltypes.oneof.oneof_msg1->substuff1,
"4059") == 0);
138 TEST(alltypes.oneof.oneof_msg1->substuff2 && *alltypes.oneof.oneof_msg1->substuff2 == 4059);
140 TEST(alltypes.opt_non_zero_based_enum && *alltypes.opt_non_zero_based_enum == NonZeroBasedEnum_Three);
143 TEST(alltypes.req_limits->int32_min && *alltypes.req_limits->int32_min == INT32_MIN);
144 TEST(alltypes.req_limits->int32_max && *alltypes.req_limits->int32_max == INT32_MAX);
145 TEST(alltypes.req_limits->uint32_min && *alltypes.req_limits->uint32_min == 0);
146 TEST(alltypes.req_limits->uint32_max && *alltypes.req_limits->uint32_max == UINT32_MAX);
147 TEST(alltypes.req_limits->int64_min && *alltypes.req_limits->int64_min == INT64_MIN);
148 TEST(alltypes.req_limits->int64_max && *alltypes.req_limits->int64_max == INT64_MAX);
149 TEST(alltypes.req_limits->uint64_min && *alltypes.req_limits->uint64_min == 0);
150 TEST(alltypes.req_limits->uint64_max && *alltypes.req_limits->uint64_max == UINT64_MAX);
153 TEST(alltypes.req_limits->largetag && *alltypes.req_limits->largetag == 1001);
155 TEST(alltypes.req_ds8);
156 TEST(alltypes.req_ds8->first && *alltypes.req_ds8->first == 9991);
157 TEST(alltypes.req_ds8->first && *alltypes.req_ds8->second == 9992);
159 TEST(alltypes.req_intsizes);
160 TEST(*alltypes.req_intsizes->req_int8 == -128);
161 TEST(*alltypes.req_intsizes->req_uint8 == 255);
162 TEST(*alltypes.req_intsizes->req_sint8 == -128);
163 TEST(*alltypes.req_intsizes->req_int16 == -32768);
164 TEST(*alltypes.req_intsizes->req_uint16 == 65535);
165 TEST(*alltypes.req_intsizes->req_sint16 == -32768);
size_t fread(void *__restrict ptr, size_t size, size_t nmemb, FILE *__restrict stream)