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/common/container.h | |
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/common/container.h')
-rw-r--r-- | src/common/container.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/container.h b/src/common/container.h index 08da34e07e..9fb4cf334c 100644 --- a/src/common/container.h +++ b/src/common/container.h @@ -27,8 +27,8 @@ typedef struct smartlist_t { /** @} */ } smartlist_t; -smartlist_t *smartlist_new(void); -void smartlist_free(smartlist_t *sl); +MOCK_DECL(smartlist_t *, smartlist_new, (void)); +MOCK_DECL(void, smartlist_free, (smartlist_t *sl)); void smartlist_clear(smartlist_t *sl); void smartlist_add(smartlist_t *sl, void *element); void smartlist_add_all(smartlist_t *sl, const smartlist_t *s2); @@ -328,11 +328,11 @@ char *smartlist_join_strings2(smartlist_t *sl, const char *join, #define DECLARE_MAP_FNS(maptype, keytype, prefix) \ typedef struct maptype maptype; \ typedef struct prefix##entry_t *prefix##iter_t; \ - maptype* prefix##new(void); \ + MOCK_DECL(maptype*, prefix##new, (void)); \ void* prefix##set(maptype *map, keytype key, void *val); \ void* prefix##get(const maptype *map, keytype key); \ void* prefix##remove(maptype *map, keytype key); \ - void prefix##free(maptype *map, void (*free_val)(void*)); \ + MOCK_DECL(void, prefix##free, (maptype *map, void (*free_val)(void*))); \ int prefix##isempty(const maptype *map); \ int prefix##size(const maptype *map); \ prefix##iter_t *prefix##iter_init(maptype *map); \ |