summaryrefslogtreecommitdiff
path: root/src/test/test.h
diff options
context:
space:
mode:
authorIsis Lovecruft <isis@torproject.org>2018-03-29 23:27:42 +0000
committerIsis Lovecruft <isis@torproject.org>2018-04-09 19:32:47 +0000
commit3ee7a8d3a545633c578e059687f7683c43108a10 (patch)
tree9c37ca610d8d27aedb251dfca206a1727ac23000 /src/test/test.h
parentc2c5b13e5d8a77eeee36028940175f182fda1ec9 (diff)
downloadtor-3ee7a8d3a545633c578e059687f7683c43108a10.tar.gz
tor-3ee7a8d3a545633c578e059687f7683c43108a10.zip
tests: Make tt_finished() macro for tests without tt_*_op() calls.
Diffstat (limited to 'src/test/test.h')
-rw-r--r--src/test/test.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/test.h b/src/test/test.h
index 91c8d3ebd3..1eb3b6a2ed 100644
--- a/src/test/test.h
+++ b/src/test/test.h
@@ -72,6 +72,14 @@
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);