From 80225b08cdda44cf1a764361131eef122f8c9451 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Fri, 4 Mar 2011 15:13:12 -0800 Subject: Added unit test 1306 so tests 558 & 559 are now fully replaced --- tests/unit/unit1305.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'tests/unit/unit1305.c') diff --git a/tests/unit/unit1305.c b/tests/unit/unit1305.c index bcf7c43ff..ab41a7dc5 100644 --- a/tests/unit/unit1305.c +++ b/tests/unit/unit1305.c @@ -117,15 +117,18 @@ UNITTEST_START struct Curl_dns_entry *nodep; size_t key_len; - 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); - abort_unless(nodep, "insertion into hash failed"); - /* Freeing will now be done by Curl_hash_destroy */ - data_node = NULL; - - /* To do: test retrieval, deletion, edge conditions */ + /* Test 1305 exits without adding anything to the hash */ + if (strcmp(arg, "1305") != 0) { + 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); + abort_unless(nodep, "insertion into hash failed"); + /* Freeing will now be done by Curl_hash_destroy */ + data_node = NULL; + + /* To do: test retrieval, deletion, edge conditions */ + } UNITTEST_STOP -- cgit v1.2.3