aboutsummaryrefslogtreecommitdiff
path: root/src/test/log_test_helpers.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-08-31 13:03:59 -0400
committerNick Mathewson <nickm@torproject.org>2016-08-31 13:11:26 -0400
commit2df6cdc9f94f59c332bf3a00787320a98678bf4e (patch)
tree3e0d64dd52f95493e0b93967a5c8b9a46fb33ce0 /src/test/log_test_helpers.h
parentd5614b2102d3d9c6deb7190f77106ab7c0ef78ad (diff)
downloadtor-2df6cdc9f94f59c332bf3a00787320a98678bf4e.tar.gz
tor-2df6cdc9f94f59c332bf3a00787320a98678bf4e.zip
Document and clean log_test_helpers.c a bit
In addition to documentation, this commit makes a function static, and removes a weird single-point-of-return-ism, and notes a thing I should fix.
Diffstat (limited to 'src/test/log_test_helpers.h')
-rw-r--r--src/test/log_test_helpers.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/test/log_test_helpers.h b/src/test/log_test_helpers.h
index 2cb76b2767..039c7ae1eb 100644
--- a/src/test/log_test_helpers.h
+++ b/src/test/log_test_helpers.h
@@ -6,19 +6,16 @@
#ifndef TOR_LOG_TEST_HELPERS_H
#define TOR_LOG_TEST_HELPERS_H
+/** An element of mock_saved_logs(); records the log element that we
+ * received. */
typedef struct mock_saved_log_entry_t {
int severity;
const char *funcname;
const char *suffix;
const char *format;
char *generated_msg;
- struct mock_saved_log_entry_t *next;
} mock_saved_log_entry_t;
-void mock_saving_logv(int severity, log_domain_mask_t domain,
- const char *funcname, const char *suffix,
- const char *format, va_list ap)
- CHECK_PRINTF(5, 0);
void mock_clean_saved_logs(void);
const smartlist_t *mock_saved_logs(void);
int setup_capture_of_logs(int new_level);