diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-07-10 12:22:01 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-07-10 12:22:01 -0400 |
commit | 4f42c923d61655235ebbae82f64106ecff9458d7 (patch) | |
tree | 10246207ad5003f7c6ba40a64af0dbb7801af41f /src/lib/testsupport | |
parent | 4793d913503f9349ca4b57d77a47bd1bbceecfe5 (diff) | |
download | tor-4f42c923d61655235ebbae82f64106ecff9458d7.tar.gz tor-4f42c923d61655235ebbae82f64106ecff9458d7.zip |
File-level summary documentation for src/lib/*/*.[ch]
Diffstat (limited to 'src/lib/testsupport')
-rw-r--r-- | src/lib/testsupport/testsupport.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/lib/testsupport/testsupport.h b/src/lib/testsupport/testsupport.h index 9a55d306fc..3ae1b48f87 100644 --- a/src/lib/testsupport/testsupport.h +++ b/src/lib/testsupport/testsupport.h @@ -1,10 +1,24 @@ /* Copyright (c) 2013-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ +/** + * \file testsupport.h + * + * \brief Macros to implement mocking and selective exposure for the test code. + * + * Each Tor source file is built twice: once with TOR_UNIT_TESTS defined, and + * once with it undefined. The only difference between these configurations + * should be that when building for the tests, more functions are exposed as + * non-static, and a number of functions are declared as mockable. + **/ + #ifndef TOR_TESTSUPPORT_H #define TOR_TESTSUPPORT_H #ifdef TOR_UNIT_TESTS +/** The "STATIC" macro marks a function or variable that is static when + * building Tor for production, but non-static when building the unit + * tests. */ #define STATIC #define EXTERN(type, name) extern type name; #else @@ -87,4 +101,3 @@ /** @} */ #endif /* !defined(TOR_TESTSUPPORT_H) */ - |