unit-tests: Always load address of testable functions

The addresses can actually change as plugins are loaded/unloaded for
each test case.

Fixes #551.
This commit is contained in:
Tobias Brunner
2014-03-31 17:00:22 +02:00
parent 2a38b4556e
commit 036dab0a10
+1 -1
View File
@@ -82,7 +82,7 @@ static ret (*TEST_##ns##name)(__VA_ARGS__);
*/ */
#define TEST_FUNCTION(ns, name, ...) \ #define TEST_FUNCTION(ns, name, ...) \
({ \ ({ \
if (!TEST_##ns##name && testable_functions) \ if (testable_functions) \
{ \ { \
TEST_##ns##name = testable_functions->get(testable_functions, #ns "/" #name); \ TEST_##ns##name = testable_functions->get(testable_functions, #ns "/" #name); \
} \ } \