diff options
Diffstat (limited to 'src/test/test_router.c')
-rw-r--r-- | src/test/test_router.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/test/test_router.c b/src/test/test_router.c index a1ea2967ff..572ddceaa7 100644 --- a/src/test/test_router.c +++ b/src/test/test_router.c @@ -31,15 +31,13 @@ #include "test/test.h" #include "test/log_test_helpers.h" -#define NS_MODULE rtr -#define NS_SUBMODULE tests - -NS_DECL(const routerinfo_t *, router_get_my_routerinfo, (void)); +static const routerinfo_t * rtr_tests_router_get_my_routerinfo(void); +ATTR_UNUSED static int rtr_tests_router_get_my_routerinfo_called = 0; static routerinfo_t* mock_routerinfo; static const routerinfo_t* -NS(router_get_my_routerinfo)(void) +rtr_tests_router_get_my_routerinfo(void) { crypto_pk_t* ident_key; crypto_pk_t* tap_key; @@ -89,7 +87,8 @@ test_router_dump_router_to_string_no_bridge_distribution_method(void *arg) char* found = NULL; (void)arg; - NS_MOCK(router_get_my_routerinfo); + MOCK(router_get_my_routerinfo, + rtr_tests_router_get_my_routerinfo); options->ORPort_set = 1; options->BridgeRelay = 1; @@ -123,7 +122,7 @@ test_router_dump_router_to_string_no_bridge_distribution_method(void *arg) tt_ptr_op(found, OP_NE, NULL); done: - NS_UNMOCK(router_get_my_routerinfo); + UNMOCK(router_get_my_routerinfo); tor_free(desc); } |