Lines Matching refs:tests

71 /* CURLOPT_RESOLVE address parsing tests */
72 static const struct testcase tests[] = {
112 int testnum = sizeof(tests) / sizeof(struct testcase);
119 int addressnum = sizeof(tests[i].address) / sizeof(*tests[i].address);
133 list = curl_slist_append(NULL, tests[i].optval);
140 entry_id = (void *)aprintf("%s:%d", tests[i].host, tests[i].port);
153 if(!addr && !tests[i].address[j])
156 if(tests[i].address[j] == &skip)
161 fprintf(stderr, "%s:%d tests[%d] failed. getaddressinfo failed.\n",
167 if(addr && !tests[i].address[j]) {
168 fprintf(stderr, "%s:%d tests[%d] failed. the retrieved addr "
169 "is %s but tests[%d].address[%d] is NULL.\n",
175 if(!addr && tests[i].address[j]) {
176 fprintf(stderr, "%s:%d tests[%d] failed. the retrieved addr "
177 "is NULL but tests[%d].address[%d] is %s.\n",
178 __FILE__, __LINE__, i, i, j, tests[i].address[j]);
183 if(!curl_strequal(ipaddress, tests[i].address[j])) {
184 fprintf(stderr, "%s:%d tests[%d] failed. the retrieved addr "
185 "%s is not equal to tests[%d].address[%d] %s.\n",
186 __FILE__, __LINE__, i, ipaddress, i, j, tests[i].address[j]);
191 if(port != tests[i].port) {
192 fprintf(stderr, "%s:%d tests[%d] failed. the retrieved port "
193 "for tests[%d].address[%d] is %d but tests[%d].port is %d.\n",
194 __FILE__, __LINE__, i, i, j, port, i, tests[i].port);
199 if(dns->timestamp && tests[i].permanent) {
200 fprintf(stderr, "%s:%d tests[%d] failed. the timestamp is not zero "
201 "but tests[%d].permanent is TRUE\n",
207 if(dns->timestamp == 0 && !tests[i].permanent) {
208 fprintf(stderr, "%s:%d tests[%d] failed. the timestamp is zero "
209 "but tests[%d].permanent is FALSE\n",