diff options
author | Neel Chauhan <neel@neelc.org> | 2016-11-15 20:33:31 -0500 |
---|---|---|
committer | teor <teor2345@gmail.com> | 2016-11-16 12:57:05 +1100 |
commit | cccc08ad565f340bd4e6d19d0137bc45ced93107 (patch) | |
tree | f6ca8a8f81514c33fd07cf5c3b1bb72767c6bef8 /src/test/log_test_helpers.h | |
parent | e4ef9f7491ed1495869692b57644885f9772bef5 (diff) | |
download | tor-cccc08ad565f340bd4e6d19d0137bc45ced93107.tar.gz tor-cccc08ad565f340bd4e6d19d0137bc45ced93107.zip |
Add expect_log_msg_containing_either3() and expect_log_msg_containing_either4()
Diffstat (limited to 'src/test/log_test_helpers.h')
-rw-r--r-- | src/test/log_test_helpers.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/log_test_helpers.h b/src/test/log_test_helpers.h index 4c020c7ec3..a8ad7e8cc0 100644 --- a/src/test/log_test_helpers.h +++ b/src/test/log_test_helpers.h @@ -51,6 +51,21 @@ void mock_dump_saved_logs(void); mock_saved_log_has_message_containing(str2), \ "expected log to contain " # str1 " or " # str2); +#define expect_log_msg_containing_either3(str1, str2, str3) \ + assert_log_predicate3(mock_saved_log_has_message_containing(str1) || \ + (mock_saved_log_has_message_containing(str2) || \ + mock_saved_log_has_message_containing(str3), \ + "expected log to contain " # str1 " or " # str2 " or " # str3); + +#define expect_log_msg_containing_either4(str1, str2, str3, str4) \ + assert_log_predicate4(mock_saved_log_has_message_containing(str1) || \ + (mock_saved_log_has_message_containing(str2) || \ + (mock_saved_log_has_message_containing(str3) || \ + mock_saved_log_has_message_containing(str4), \ + "expected log to contain " # str1 " or " # str2 " or " # str3 " or " # str4); + + + #define expect_single_log_msg(str) \ do { \ \ |