summaryrefslogtreecommitdiff
path: root/src/test/log_test_helpers.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/log_test_helpers.h')
-rw-r--r--src/test/log_test_helpers.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/log_test_helpers.h b/src/test/log_test_helpers.h
index 039c7ae1eb..f33ee67a90 100644
--- a/src/test/log_test_helpers.h
+++ b/src/test/log_test_helpers.h
@@ -35,6 +35,13 @@ int mock_saved_log_has_entry(void);
tt_assert_msg(mock_saved_log_has_message_containing(str), \
"expected log to contain " # str);
+#define expect_single_log_msg_containing(str) \
+ do { \
+ tt_assert_msg(mock_saved_log_has_message_containing(str), \
+ "expected log to contain " # str); \
+ tt_int_op(smartlist_len(mock_saved_logs()), OP_EQ, 1); \
+ } while (0);
+
#define expect_no_log_msg(str) \
tt_assert_msg(!mock_saved_log_has_message(str), \
"expected log to not contain " # str);