diff options
author | dana koch <dsk@google.com> | 2014-08-27 20:41:25 +1000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-08-29 12:55:28 -0400 |
commit | c887e20e6a5a2c17c65f308e70e578e773b2ab23 (patch) | |
tree | ceef57b8043c107c11ed17f9658c737d2c2caf23 /src/or/nodelist.c | |
parent | cc3b04a8c1edbeb1a488e319e3c0d28acd227417 (diff) | |
download | tor-c887e20e6a5a2c17c65f308e70e578e773b2ab23.tar.gz tor-c887e20e6a5a2c17c65f308e70e578e773b2ab23.zip |
Introduce full coverage tests for module routerset.c.
This is using the paradigm introduced for test_status.c.
Diffstat (limited to 'src/or/nodelist.c')
-rw-r--r-- | src/or/nodelist.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/nodelist.c b/src/or/nodelist.c index 7b1f338bd4..21e4ec219f 100644 --- a/src/or/nodelist.c +++ b/src/or/nodelist.c @@ -474,8 +474,8 @@ nodelist_assert_ok(void) /** Return a list of a node_t * for every node we know about. The caller * MUST NOT modify the list. (You can set and clear flags in the nodes if * you must, but you must not add or remove nodes.) */ -smartlist_t * -nodelist_get_list(void) +MOCK_IMPL(smartlist_t *, +nodelist_get_list,(void)) { init_nodelist(); return the_nodelist->nodes; @@ -517,8 +517,8 @@ node_get_by_hex_id(const char *hex_id) * the corresponding node_t, or NULL if none exists. Warn the user if * <b>warn_if_unnamed</b> is set, and they have specified a router by * nickname, but the Named flag isn't set for that router. */ -const node_t * -node_get_by_nickname(const char *nickname, int warn_if_unnamed) +MOCK_IMPL(const node_t *, +node_get_by_nickname,(const char *nickname, int warn_if_unnamed)) { const node_t *node; if (!the_nodelist) |