diff options
author | Chelsea H. Komlo <chelsea.komlo@gmail.com> | 2016-10-18 19:04:22 -0500 |
---|---|---|
committer | Chelsea H. Komlo <chelsea.komlo@gmail.com> | 2016-10-19 12:25:50 -0500 |
commit | 471b0c5175521bb2bc49eb7e30d78f656a3a2843 (patch) | |
tree | 1ab750249a93fcf5f9177f8b48cd11f79f726345 /src/test/test_dir.c | |
parent | 195ccce94e250a150e208f7a8fb9ba8375b6fe89 (diff) | |
download | tor-471b0c5175521bb2bc49eb7e30d78f656a3a2843.tar.gz tor-471b0c5175521bb2bc49eb7e30d78f656a3a2843.zip |
Refactor purpose_needs_anonymity to use switch statement
Diffstat (limited to 'src/test/test_dir.c')
-rw-r--r-- | src/test/test_dir.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/test_dir.c b/src/test/test_dir.c index 73a8a355ac..0f6166d718 100644 --- a/src/test/test_dir.c +++ b/src/test/test_dir.c @@ -3253,6 +3253,15 @@ test_dir_http_handling(void *args) } static void +test_dir_purpose_needs_anonymity_returns_true_by_default(void *arg) +{ + (void)arg; + + tt_int_op(1, ==, purpose_needs_anonymity(0, 0)); + done: ; +} + +static void test_dir_purpose_needs_anonymity_returns_true_for_bridges(void *arg) { (void)arg; @@ -5500,6 +5509,7 @@ struct testcase_t dir_tests[] = { DIR(dirserv_set_routerstatus_testing, 0), DIR(http_handling, 0), DIR(purpose_needs_anonymity_returns_true_for_bridges, 0), + DIR(purpose_needs_anonymity_returns_true_by_default, 0), DIR(purpose_needs_anonymity_returns_true_for_sensitive_purpose, 0), DIR(purpose_needs_anonymity_ret_false_for_non_sensitive_conn, 0), DIR(fetch_type, 0), |