mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
Added unit test 1306 so tests 558 & 559 are now fully replaced
This commit is contained in:
parent
bfc491a2d2
commit
80225b08cd
@ -70,7 +70,7 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \
|
|||||||
test313 test1115 test578 test579 test1116 test1200 test1201 test1202 \
|
test313 test1115 test578 test579 test1116 test1200 test1201 test1202 \
|
||||||
test1203 test1117 test1118 test1119 test1120 test1300 test1301 test1302 \
|
test1203 test1117 test1118 test1119 test1120 test1300 test1301 test1302 \
|
||||||
test1303 test320 test321 test322 test323 test324 test1121 test581 test580 \
|
test1303 test320 test321 test322 test323 test324 test1121 test581 test580 \
|
||||||
test1304 test1305
|
test1304 test1305 test1306
|
||||||
|
|
||||||
filecheck:
|
filecheck:
|
||||||
@mkdir test-place; \
|
@mkdir test-place; \
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<testcase>
|
<testcase>
|
||||||
|
<!-- This replaces test 558 -->
|
||||||
<info>
|
<info>
|
||||||
<keywords>
|
<keywords>
|
||||||
unittest
|
unittest
|
||||||
@ -16,11 +17,14 @@ none
|
|||||||
unittest
|
unittest
|
||||||
</features>
|
</features>
|
||||||
<name>
|
<name>
|
||||||
internal hash create/add/destroy testing
|
internal hash create/destroy testing
|
||||||
</name>
|
</name>
|
||||||
<tool>
|
<tool>
|
||||||
unit1305
|
unit1305
|
||||||
</tool>
|
</tool>
|
||||||
|
<command>
|
||||||
|
1305
|
||||||
|
</command>
|
||||||
</client>
|
</client>
|
||||||
|
|
||||||
</testcase>
|
</testcase>
|
||||||
|
30
tests/data/test1306
Normal file
30
tests/data/test1306
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<testcase>
|
||||||
|
<!-- This replaces test 559 -->
|
||||||
|
<info>
|
||||||
|
<keywords>
|
||||||
|
unittest
|
||||||
|
hash
|
||||||
|
</keywords>
|
||||||
|
</info>
|
||||||
|
|
||||||
|
#
|
||||||
|
# Client-side
|
||||||
|
<client>
|
||||||
|
<server>
|
||||||
|
none
|
||||||
|
</server>
|
||||||
|
<features>
|
||||||
|
unittest
|
||||||
|
</features>
|
||||||
|
<name>
|
||||||
|
internal hash create/add/destroy testing
|
||||||
|
</name>
|
||||||
|
<tool>
|
||||||
|
unit1305
|
||||||
|
</tool>
|
||||||
|
<command>
|
||||||
|
1306
|
||||||
|
</command>
|
||||||
|
</client>
|
||||||
|
|
||||||
|
</testcase>
|
@ -117,15 +117,18 @@ UNITTEST_START
|
|||||||
struct Curl_dns_entry *nodep;
|
struct Curl_dns_entry *nodep;
|
||||||
size_t key_len;
|
size_t key_len;
|
||||||
|
|
||||||
CURLcode rc = create_node();
|
/* Test 1305 exits without adding anything to the hash */
|
||||||
abort_unless(rc == CURLE_OK, "data node creation failed");
|
if (strcmp(arg, "1305") != 0) {
|
||||||
key_len = strlen(data_key);
|
CURLcode rc = create_node();
|
||||||
|
abort_unless(rc == CURLE_OK, "data node creation failed");
|
||||||
|
key_len = strlen(data_key);
|
||||||
|
|
||||||
nodep = Curl_hash_add(hp, data_key, key_len+1, data_node);
|
nodep = Curl_hash_add(hp, data_key, key_len+1, data_node);
|
||||||
abort_unless(nodep, "insertion into hash failed");
|
abort_unless(nodep, "insertion into hash failed");
|
||||||
/* Freeing will now be done by Curl_hash_destroy */
|
/* Freeing will now be done by Curl_hash_destroy */
|
||||||
data_node = NULL;
|
data_node = NULL;
|
||||||
|
|
||||||
/* To do: test retrieval, deletion, edge conditions */
|
/* To do: test retrieval, deletion, edge conditions */
|
||||||
|
}
|
||||||
|
|
||||||
UNITTEST_STOP
|
UNITTEST_STOP
|
||||||
|
Loading…
Reference in New Issue
Block a user