aboutsummaryrefslogtreecommitdiff
path: root/src/test/test.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-10-22 09:39:06 -0400
committerNick Mathewson <nickm@torproject.org>2019-10-22 09:39:06 -0400
commitb2d487ae2249a307cd23255dbb1a22241eefd6ef (patch)
treecd754fbe8d1c13264749f997f1221b1635a97e49 /src/test/test.h
parent2d013bbe5cccaccf9ace0beec5a987fb80e850ad (diff)
parent7e7a4874b8fa333d1840cc5f2c0b118d6a0e7c47 (diff)
downloadtor-b2d487ae2249a307cd23255dbb1a22241eefd6ef.tar.gz
tor-b2d487ae2249a307cd23255dbb1a22241eefd6ef.zip
Merge branch 'ticket31705_v2' into ticket31705_v2_merged
Conflicts: src/feature/dirparse/authcert_parse.c src/feature/dirparse/ns_parse.c src/feature/hs/hs_service.c src/lib/conf/conftesting.h src/lib/log/log.h src/lib/thread/threads.h src/test/test_options.c These conflicts were mostly related to autostyle improvements, with one or two due to doxygen fixes.
Diffstat (limited to 'src/test/test.h')
-rw-r--r--src/test/test.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/test.h b/src/test/test.h
index 76c4c0ec75..e9caef3fec 100644
--- a/src/test/test.h
+++ b/src/test/test.h
@@ -37,6 +37,7 @@
#define test_memeq_hex(expr1, hex) test_mem_op_hex(expr1, OP_EQ, hex)
+#ifndef COCCI
#define tt_double_op(a,op,b) \
tt_assert_test_type(a,b,#a" "#op" "#b,double,(val1_ op val2_),"%g", \
TT_EXIT_TEST_FUNCTION)
@@ -64,6 +65,7 @@
tt_assert_test_fmt_type(a,b,#a" "#op" "#b,int64_t,(val1_ op val2_), \
int64_t, "%"PRId64, \
{print_ = (int64_t) value_;}, {}, TT_EXIT_TEST_FUNCTION)
+#endif
/**
* Declare that the test is done, even though no tt___op() calls were made.
@@ -145,6 +147,7 @@ void free_pregenerated_keys(void);
#define NAME_TEST_(name) #name
#define NAME_TEST(name) NAME_TEST_(name)
#define ASPECT(test_module, test_name) US2_CONCAT_2__(test_module, test_name)
+#ifndef COCCI
#define TEST_CASE(function) \
{ \
NAME_TEST(function), \
@@ -161,15 +164,18 @@ void free_pregenerated_keys(void);
NULL, \
NULL, \
}
+#endif
#define NS(name) US_CONCAT_3_(NS_MODULE, NS_SUBMODULE, name)
#define NS_FULL(module, submodule, name) US_CONCAT_3_(module, submodule, name)
#define CALLED(mock_name) US_CONCAT_2_(NS(mock_name), called)
+#ifndef COCCI
#define NS_DECL(retval, mock_fn, args) \
extern int CALLED(mock_fn); \
static retval NS(mock_fn) args; int CALLED(mock_fn) = 0
#define NS_MOCK(name) MOCK(name, NS(name))
+#endif
#define NS_UNMOCK(name) UNMOCK(name)
extern const struct testcase_setup_t passthrough_setup;