/curl/tests/unit/ |
H A D | unit1398.c | 46 fail_unless(rc == 3, "return code should be 3"); 51 fail_unless(rc == 3, "return code should be 3"); 57 fail_unless(rc == 2, "return code should be 2"); 58 fail_unless(!strcmp(output, "bu"), "wrong output"); 62 fail_unless(rc == 3, "return code should be 3"); 67 fail_unless(rc == 3, "return code should be 3"); 72 fail_unless(rc == 7, "return code should be 7"); 77 fail_unless(rc == 7, "return code should be 7"); 82 fail_unless(rc == 3, "return code should be 3"); 97 fail_unless(rc == 0, "return code should be 0"); [all …]
|
H A D | unit1302.c | 62 fail_unless(size == 4, "size should be 4"); 68 fail_unless(size == 4, "size should be 4"); 74 fail_unless(size == 4, "size should be 4"); 80 fail_unless(size == 8, "size should be 8"); 86 fail_unless(size == 8, "size should be 8"); 92 fail_unless(size == 6, "size should be 6"); 98 fail_unless(size == 6, "size should be 6"); 105 fail_unless(size == 8, "size should be 8"); 111 fail_unless(size == 0, "size should be 0"); 117 fail_unless(size == 0, "size should be 0"); [all …]
|
H A D | unit1661.c | 34 fail_unless(p, "pointer to free may not be NULL"); in test_free() 64 fail_unless(!bufref.len, "Initial length must be NULL"); 65 fail_unless(!bufref.dtor, "Destructor must be NULL"); 76 fail_unless(bufref.len == 13, "Data size badly set"); 83 fail_unless((char *) Curl_bufref_ptr(&bufref) == buffer, 98 fail_unless(freecount == 1, "Destructor not called"); 101 fail_unless(buffer, "Allocated pointer is NULL"); 102 fail_unless(bufref.len == 3, "Wrong data size stored"); 111 fail_unless(freecount == 1, "Wrong destructor called"); 113 fail_unless(!bufref.len, "Initial length must be NULL"); [all …]
|
H A D | unit1603.c | 83 fail_unless(nodep, "insertion into hash failed"); 88 fail_unless(nodep, "insertion into hash failed"); 93 fail_unless(nodep, "insertion into hash failed"); 99 fail_unless(nodep, "insertion into hash failed"); 115 fail_unless(rc == 0, "hash delete failed"); 123 fail_unless(nodep, "insertion into hash failed"); 129 fail_unless(rc == 0, "hash delete failed"); 137 fail_unless(rc == 0, "hash delete failed"); 145 fail_unless(rc, "hash delete should have failed"); 149 fail_unless(nodep, "insertion into hash failed"); [all …]
|
H A D | unit1304.c | 71 fail_unless(result == 0, "Host should have been found"); 75 fail_unless(strncmp(s_login, "me", 2) == 0, 89 fail_unless(strncmp(s_login, "me", 2) == 0, 100 fail_unless(result == 0, "Host should have been found"); 104 fail_unless(strncmp(s_login, "admi", 4) == 0, 115 fail_unless(result == 0, "Host should have been found"); 119 fail_unless(strncmp(s_login, "adminn", 6) == 0, 132 fail_unless(strncmp(s_password, "passwd", 6) == 0, 147 fail_unless(strncmp(s_password, "passwd", 6) == 0, 165 fail_unless(strncmp(s_password, "none", 4) == 0, [all …]
|
H A D | unit1300.c | 76 fail_unless(Curl_llist_count(&llist) == 0, 78 fail_unless(Curl_llist_head(&llist) == NULL, 80 fail_unless(Curl_llist_tail(&llist) == NULL, 96 fail_unless(Curl_llist_count(&llist) == 1, 158 fail_unless(Curl_llist_count(&llist) == (llist_size-1), 160 fail_unless(Curl_llist_head(&llist) == element_next, 179 fail_unless(llist_size == 3, "should be 3 list members"); 205 fail_unless(Curl_llist_tail(&llist) == element_prev, 219 fail_unless(Curl_llist_head(&llist) == NULL, 221 fail_unless(Curl_llist_tail(&llist) == NULL, [all …]
|
H A D | unit2602.c | 64 fail_unless(Curl_dynhds_count(&hds) == 2, "should hold 2"); 72 fail_unless(Curl_dynhds_count(&hds) == 2, "should hold 2"); 75 fail_unless(result, "add should have failed"); 80 fail_unless(Curl_dynhds_get(&hds, "test1", 5), "false negative"); 82 fail_unless(Curl_dynhds_ccount_name(&hds, "test2") == 1, "should"); 83 fail_unless(Curl_dynhds_cget(&hds, "test2"), "should"); 84 fail_unless(Curl_dynhds_ccount_name(&hds, "TEST2") == 1, "should"); 85 fail_unless(Curl_dynhds_ccontains(&hds, "TesT2"), "should"); 86 fail_unless(Curl_dynhds_contains(&hds, "TeSt2", 5), "should"); 107 fail_unless(result, "add should have failed"); [all …]
|
H A D | unit1620.c | 54 fail_unless(rc == CURLE_OK, "Curl_parse_login_details() failed"); in test_parse() 61 fail_unless(!exp_username || strcmp(userstr, exp_username) == 0, in test_parse() 65 fail_unless(!exp_options || strcmp(options, exp_options) == 0, in test_parse() 86 fail_unless(rc == CURLE_OK, "Curl_open() failed"); 89 fail_unless(rc == CURLE_URL_MALFORMAT, 92 fail_unless(empty->magic == CURLEASY_MAGIC_NUMBER, 97 fail_unless(rc == CURLE_URL_MALFORMAT, 101 fail_unless(rc == CURLE_OK, "Curl_userdefined() failed"); 104 fail_unless(rc == CURLE_OK, "Curl_init_do() failed"); 123 fail_unless(empty->set.str[i] == NULL, [all …]
|
H A D | unit1655.c | 115 fail_unless(d == playlist[i].expected_result, 123 fail_unless(victim.canary1 == 87, 126 fail_unless(victim.canary2 == 35, 128 fail_unless(victim.canary3 == 41, 134 fail_unless(olen > strlen(name), "unrealistic low size"); 155 fail_unless(ret == DOH_OK, "sunshine case 1 should pass fine"); 157 fail_unless(olen1 > strlen(sunshine1), "bad out length"); 162 fail_unless(ret2 == DOH_OK, "dotshine case should pass fine"); 169 fail_unless(ret2 == DOH_OK, "sunshine case 2 should pass fine"); 171 fail_unless(olen1 + 1 == olen2, "olen should grow with the hostname"); [all …]
|
H A D | unit1652.c | 104 fail_unless(verify(output, input) == 0, "Simple string test"); 108 fail_unless(verify(output, "Simple Test 42 testing 43\n") == 0, 113 fail_unless(strlen(output) == 1, "Empty string"); 115 fail_unless(verify(output, "(nil)") == 0, "Passing NULL as string"); 121 fail_unless(strlen(output) == 2048, "No truncation of infof input"); 122 fail_unless(verify(output, input) == 0, "No truncation of infof input"); 123 fail_unless(output[sizeof(output) - 1] == '\0', 129 fail_unless(strlen(output) == 2051, "Truncation of infof input 1"); 130 fail_unless(output[sizeof(output) - 1] == '\0', "Truncation of infof input 1"); 136 fail_unless(strlen(output) == 2051, "Truncation of infof input 2"); [all …]
|
H A D | unit1653.c | 74 fail_unless(ret == CURLUE_OK, "parse_port returned error"); 88 fail_unless(ret != CURLUE_OK, "parse_port true on error"); 99 fail_unless(ret == CURLUE_OK, "parse_port returned error"); 116 fail_unless(ret == CURLUE_OK, "parse_port returned error"); 132 fail_unless(ret == CURLUE_OK, "parse_port returned error"); 144 fail_unless(ret == CURLUE_OK, "parse_port returned error"); 160 fail_unless(ret != CURLUE_OK, "parse_port true on error"); 171 fail_unless(ret != CURLUE_OK, "parse_port true on error"); 184 fail_unless(ret == CURLUE_OK, "parse_port returned error"); 196 fail_unless(ret == CURLUE_OK, "parse_port returned error"); [all …]
|
H A D | unit1308.c | 57 fail_unless(rc == 0, "curl_formadd returned error"); 61 fail_unless(post == last, "post and last weren't the same"); 68 fail_unless(rc == 0, "curl_formadd returned error"); 74 fail_unless(rc == 0, "curl_formadd returned error"); 79 fail_unless(res == 0, "curl_formget returned error"); 81 fail_unless(total_size == 518, "curl_formget got wrong size back"); 97 fail_unless(rc == 0, "curl_formadd returned error"); 102 fail_unless(res == 0, "curl_formget returned error"); 103 fail_unless(total_size == 899, "curl_formget got wrong size back");
|
H A D | unit2601.c | 110 fail_unless(q.chunk_size == chunk_size, "chunk_size init wrong"); in check_bufq() 111 fail_unless(q.max_chunks == max_chunks, "max_chunks init wrong"); in check_bufq() 112 fail_unless(q.head == NULL, "init: head not NULL"); in check_bufq() 113 fail_unless(q.tail == NULL, "init: tail not NULL"); in check_bufq() 114 fail_unless(q.spare == NULL, "init: spare not NULL"); in check_bufq() 115 fail_unless(Curl_bufq_len(&q) == 0, "init: bufq length != 0"); in check_bufq() 118 fail_unless(n >= 0, "write: negative size returned"); in check_bufq() 119 fail_unless((size_t)n <= wsize, "write: wrong size returned"); in check_bufq() 120 fail_unless(result == CURLE_OK, "write: wrong result returned"); in check_bufq() 205 fail_unless(n > 0, "read-loop: unexpected fail"); in check_bufq() [all …]
|
H A D | unit1606.c | 81 fail_unless(runawhile(41, 41, 40, 0) == 41, 83 fail_unless(runawhile(21, 21, 20, 0) == 21, 85 fail_unless(runawhile(60, 60, 40, 0) == 60, 87 fail_unless(runawhile(50, 50, 40, 0) == 50, 89 fail_unless(runawhile(40, 40, 40, 0) == 99, 91 fail_unless(runawhile(10, 50, 100, 2) == 36,
|
H A D | unit1654.c | 60 fail_unless(Curl_llist_count(&asi->list) == 4, "wrong number of entries"); 66 fail_unless(Curl_llist_count(&asi->list) == 5, "wrong number of entries"); 71 fail_unless(Curl_llist_count(&asi->list) == 6, "wrong number of entries"); 78 fail_unless(Curl_llist_count(&asi->list) == 8, "wrong number of entries"); 84 fail_unless(Curl_llist_count(&asi->list) == 9, "wrong number of entries"); 91 fail_unless(Curl_llist_count(&asi->list) == 10, "wrong number of entries"); 98 fail_unless(Curl_llist_count(&asi->list) == 12, "wrong number of entries"); 104 fail_unless(Curl_llist_count(&asi->list) == 10, "wrong number of entries");
|
H A D | unit3200.c | 108 fail_unless(line && !strcmp("LINE1\n", line), 112 fail_unless(line && !strcmp("LINE2 NEWLINE\n", line), 120 fail_unless(line && !strcmp("LINE1\n", line), 124 fail_unless(line && !strcmp("LINE2 NONEWLINE\n", line), 132 fail_unless(line && !strcmp("LINE1\n", line), 135 fail_unless(!Curl_dyn_len(&buf), 141 fail_unless(line && !strcmp("LINE1\n", line), 144 fail_unless(!Curl_dyn_len(&buf), 150 fail_unless(line && !strcmp("LINE1\n", line), 153 fail_unless(!Curl_dyn_len(&buf), [all …]
|
H A D | unit1663.c | 62 fail_unless(rc == exp_rc, "Curl_parse_interface() failed"); in test_parse() 64 fail_unless(!!exp_dev == !!dev, "dev expectation failed."); in test_parse() 65 fail_unless(!!exp_iface == !!iface, "iface expectation failed"); in test_parse() 66 fail_unless(!!exp_host == !!host, "host expectation failed"); in test_parse() 69 fail_unless(!exp_dev || strcmp(dev, exp_dev) == 0, in test_parse() 71 fail_unless(!exp_iface || strcmp(iface, exp_iface) == 0, in test_parse() 73 fail_unless(!exp_host || strcmp(host, exp_host) == 0, in test_parse()
|
H A D | unit1396.c | 93 fail_unless(outlen == list1[i].outlen, "wrong output length returned"); 94 fail_unless(!memcmp(out, list1[i].out, list1[i].outlen), 108 fail_unless(outlen == list2[i].outlen, "wrong output length returned"); 109 fail_unless(!memcmp(out, list2[i].out, list2[i].outlen),
|
H A D | unit1399.c | 69 fail_unless(usec_matches_seconds(data->progress.t_nslookup, seconds), msg); in expect_timer_seconds() 70 fail_unless(usec_matches_seconds(data->progress.t_connect, seconds), msg); in expect_timer_seconds() 71 fail_unless(usec_matches_seconds(data->progress.t_appconnect, seconds), msg); in expect_timer_seconds() 72 fail_unless(usec_matches_seconds(data->progress.t_pretransfer, seconds), in expect_timer_seconds() 74 fail_unless(usec_matches_seconds(data->progress.t_starttransfer, seconds), in expect_timer_seconds()
|
H A D | unit1605.c | 54 fail_unless(esc == NULL, "negative string length can't work"); 57 fail_unless(esc == NULL, "negative string length can't work");
|
H A D | unit1309.c | 112 fail_unless(root == NULL, "tree not empty after removing all nodes"); 142 fail_unless(root == NULL, "tree not empty when it should be");
|
H A D | unit1651.c | 365 fail_unless(result == CURLE_OK, "Curl_extract_certinfo returned error");
|
H A D | curlcheck.h | 36 #define fail_unless(expr, msg) \ macro
|
H A D | unit1656.c | 118 fail_unless(all_ok, "some tests of Curl_x509_GTime2str() fails");
|
/curl/tests/libtest/ |
H A D | lib1301.c | 26 #define fail_unless(expr, msg) \ macro 41 fail_unless(rc != 0, "return code should be non-zero"); in test() 44 fail_unless(rc == 0, "return code should be zero"); in test() 47 fail_unless(rc == 0, "return code should be zero"); in test() 50 fail_unless(rc != 0, "return code should be non-zero"); in test() 53 fail_unless(rc != 0, "return code should be non-zero"); in test() 56 fail_unless(rc != 0, "return code should be non-zero"); in test() 59 fail_unless(rc != 0, "return code should be non-zero"); in test()
|