Browse Source

Test for circuit_set_rend_token(.,.,NULL)

Nick Mathewson 10 years ago
parent
commit
d22ce149c8
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/test/test_circuitlist.c

+ 5 - 0
src/test/test_circuitlist.c

@@ -238,6 +238,11 @@ test_rend_token_maps(void *arg)
   tt_ptr_op(c4->rendinfo, !=, NULL);
   test_mem_op(c4->rendinfo, ==, tok3, REND_TOKEN_LEN);
 
+  /* Now clear c4's cookie. */
+  circuit_set_intro_point_digest(c4, NULL);
+  tt_ptr_op(c4->rendinfo, ==, NULL);
+  tt_ptr_op(NULL, ==, circuit_get_intro_point(tok3));
+
  done:
   circuit_free(TO_CIRCUIT(c1));
   circuit_free(TO_CIRCUIT(c2));