]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
tests: Make tt_finished() macro for tests without tt_*_op() calls.
authorIsis Lovecruft <isis@torproject.org>
Thu, 29 Mar 2018 23:27:42 +0000 (23:27 +0000)
committerIsis Lovecruft <isis@torproject.org>
Mon, 9 Apr 2018 19:32:47 +0000 (19:32 +0000)
src/test/test.h
src/test/test_bridges.c

index 91c8d3ebd3c9b6dddb233c1280911a69ef6a5a53..1eb3b6a2eda53e4ffab7fc0adcb9849cc50d7acd 100644 (file)
     I64_PRINTF_TYPE, I64_FORMAT,                                       \
     {print_ = (I64_PRINTF_TYPE) value_;}, {}, TT_EXIT_TEST_FUNCTION)
 
+/**
+ * Declare that the test is done, even though no tt___op() calls were made.
+ *
+ * For use when you only want to test calling something, but not check
+ * any values/pointers/etc afterwards.
+ */
+#define tt_finished() TT_EXIT_TEST_FUNCTION
+
 const char *get_fname(const char *name);
 const char *get_fname_rnd(const char *name);
 struct crypto_pk_t *pk_generate(int idx);
index aada363d9914d4fa305e2c4c69c427e291e4fe71..b5bd27e0983123228aa4674b6b2e180e7e9ba5af 100644 (file)
@@ -107,7 +107,7 @@ static void
 test_bridges_helper_func_add_bridges_to_bridgelist(void *arg)
 {
   helper_add_bridges_to_bridgelist(arg);
-  tt_int_op(0, OP_EQ, 0);
+  tt_finished();
 
  done:
   mark_bridge_list();