Lines Matching refs:hds

43   struct dynhds hds;  variable
49 Curl_dynhds_init(&hds, 2, 128);
50 fail_if(Curl_dynhds_count(&hds), "should be empty");
51 fail_if(Curl_dynhds_add(&hds, "test1", 5, "123", 3), "add failed");
52 fail_if(Curl_dynhds_add(&hds, "test2", 5, "456", 3), "add failed");
55 if(Curl_dynhds_remove(&hds, "test2", 5) != 1) {
59 if(Curl_dynhds_add(&hds, "test2", 5, "456", 3)) {
64 fail_unless(Curl_dynhds_count(&hds) == 2, "should hold 2");
67 if(Curl_dynhds_set(&hds, "test2", 5, "456", 3)) {
72 fail_unless(Curl_dynhds_count(&hds) == 2, "should hold 2");
74 result = Curl_dynhds_add(&hds, "test3", 5, "789", 3);
77 fail_unless(Curl_dynhds_count_name(&hds, "test", 4) == 0, "false positive");
78 fail_unless(Curl_dynhds_count_name(&hds, "test1", 4) == 0, "false positive");
79 fail_if(Curl_dynhds_get(&hds, "test1", 4), "false positive");
80 fail_unless(Curl_dynhds_get(&hds, "test1", 5), "false negative");
81 fail_unless(Curl_dynhds_count_name(&hds, "test1", 5) == 1, "should");
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");
87 Curl_dynhds_free(&hds);
90 Curl_dynhds_init(&hds, 128, 10);
91 fail_if(Curl_dynhds_add(&hds, "test1", 5, "123", 3), "add failed");
92 fail_unless(Curl_dynhds_add(&hds, "test2", 5, "456", 3), "should fail");
93 fail_if(Curl_dynhds_add(&hds, "t", 1, "1", 1), "add failed");
94 Curl_dynhds_reset(&hds);
95 Curl_dynhds_free(&hds);
97 Curl_dynhds_init(&hds, 128, 4*1024);
98 fail_if(Curl_dynhds_add(&hds, "test1", 5, "123", 3), "add failed");
99 fail_if(Curl_dynhds_add(&hds, "test1", 5, "123", 3), "add failed");
100 fail_if(Curl_dynhds_cadd(&hds, "blablabla", "thingies"), "add failed");
101 fail_if(Curl_dynhds_h1_cadd_line(&hds, "blablabla: thingies"), "add failed");
102 fail_unless(Curl_dynhds_ccount_name(&hds, "blablabla") == 2, "should");
103 fail_unless(Curl_dynhds_cremove(&hds, "blablabla") == 2, "should");
104 fail_if(Curl_dynhds_ccontains(&hds, "blablabla"), "should not");
106 result = Curl_dynhds_h1_cadd_line(&hds, "blablabla thingies");
109 fail_unless(Curl_dynhds_ccount_name(&hds, "bLABlaBlA") == 0, "should");
110 fail_if(Curl_dynhds_cadd(&hds, "Bla-Bla", "thingies"), "add failed");
113 fail_if(Curl_dynhds_h1_dprint(&hds, &dbuf), "h1 print failed");
122 Curl_dynhds_free(&hds);
123 Curl_dynhds_init(&hds, 128, 4*1024);
125 result = Curl_dynhds_h1_cadd_line(&hds, " indented value");
129 fail_if(Curl_dynhds_h1_cadd_line(&hds, "ti1: val1"), "add");
130 fail_if(Curl_dynhds_h1_cadd_line(&hds, " val2"), "add indent");
131 fail_if(Curl_dynhds_h1_cadd_line(&hds, "ti2: val1"), "add");
132 fail_if(Curl_dynhds_h1_cadd_line(&hds, "\tval2"), "add indent");
133 fail_if(Curl_dynhds_h1_cadd_line(&hds, "ti3: val1"), "add");
134 fail_if(Curl_dynhds_h1_cadd_line(&hds, " val2"), "add indent");
137 fail_if(Curl_dynhds_h1_dprint(&hds, &dbuf), "h1 print failed");
146 Curl_dynhds_free(&hds);