aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2014-02-28 17:13:33 +0100
committerTobias Brunner <tobias@strongswan.org>2014-03-20 15:29:27 +0100
commit2c687b3cb3fe15fd2cd9f39025075c469f416e70 (patch)
tree23845cb5330be9a8dcc78d39fc18ffdde0ccaf78 /src
parentf51169eb095304039e770b779ee0b9a8484f6b02 (diff)
downloadstrongswan-2c687b3cb3fe15fd2cd9f39025075c469f416e70.tar.bz2
strongswan-2c687b3cb3fe15fd2cd9f39025075c469f416e70.tar.xz
unit-tests: Prefix imported testable functions with TEST_
This avoids any clashes with existing functions in the monolithic build.
Diffstat (limited to 'src')
-rw-r--r--src/libstrongswan/utils/test.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstrongswan/utils/test.h b/src/libstrongswan/utils/test.h
index b43a92b1f..38887946d 100644
--- a/src/libstrongswan/utils/test.h
+++ b/src/libstrongswan/utils/test.h
@@ -65,8 +65,8 @@ static void testable_function_unregister_##fn() \
/**
* Import a registered function so that it can be called from tests.
*
- * @note If the imported function is static (or no conflicting header files
- * are included) ret can be prefixed with static to declare the function static.
+ * The function name is prefixed with TEST_ to avoid clashes when building
+ * monolithically.
*
* @note We allocate an arbitrary amount of stack space, hopefully enough for
* all arguments.
@@ -77,7 +77,7 @@ static void testable_function_unregister_##fn() \
* @param ... arguments of the function
*/
#define IMPORT_FUNCTION_FOR_TESTS(ns, name, ret, ...) \
-ret name(__VA_ARGS__) \
+static ret TEST_##name(__VA_ARGS__) \
{ \
void (*fn)() = NULL; \
if (testable_functions) \