]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
unit-tests: Always load address of testable functions
authorTobias Brunner <tobias@strongswan.org>
Mon, 31 Mar 2014 14:58:46 +0000 (16:58 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 31 Mar 2014 15:00:22 +0000 (17:00 +0200)
The addresses can actually change as plugins are loaded/unloaded for
each test case.

Fixes #551.

src/libstrongswan/utils/test.h

index 51362a15b5c1a7d7834c99dd7f51d320da192952..a1b2a2d9b93f5752b7637430ae7d95053e2239a4 100644 (file)
@@ -82,7 +82,7 @@ static ret (*TEST_##ns##name)(__VA_ARGS__);
  */
 #define TEST_FUNCTION(ns, name, ...) \
 ({ \
-       if (!TEST_##ns##name && testable_functions) \
+       if (testable_functions) \
        { \
                TEST_##ns##name = testable_functions->get(testable_functions, #ns "/" #name); \
        } \