]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Aim for 100% test coverage on nodefamily.c
authorNick Mathewson <nickm@torproject.org>
Sat, 17 Nov 2018 17:46:59 +0000 (12:46 -0500)
committerNick Mathewson <nickm@torproject.org>
Mon, 19 Nov 2018 13:26:10 +0000 (08:26 -0500)
src/test/test_nodelist.c

index 2dbd949b7db1a7dea86e2c79c7e0d523659ab025..7e0df56df57899be50b2f5456e01633f4e466812 100644 (file)
@@ -259,6 +259,10 @@ test_nodelist_nodefamily(void *arg)
   nodefamily_t *nf2 = NULL;
   nodefamily_t *nf3 = NULL;
 
+  enc = nodefamily_format(NULL);
+  tt_str_op(enc, OP_EQ, "");
+  tor_free(enc);
+
   /* Make sure that sorting and de-duplication work. */
   tor_asprintf(&enc, "$%s hello", h1);
   nf1 = nodefamily_parse(enc, NULL, 0);
@@ -361,6 +365,7 @@ test_nodelist_nodefamily(void *arg)
   nodefamily_free(nf1);
   nodefamily_free(nf2);
   nodefamily_free(nf3);
+  nodefamily_free_all();
 }
 
 static void