From 9e7deddc2be1f5a1fc18594f5f8bbf1ed68a616a Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 15 Apr 2015 21:49:36 +0000 Subject: Add ability to run commands in context with TEST_CHECK_THROWS_AND_OR. Allows the exception message to be captured before it goes out of scope. --- lib/backupstore/StoreTestUtils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/backupstore') diff --git a/lib/backupstore/StoreTestUtils.h b/lib/backupstore/StoreTestUtils.h index 0740b3ec..37c6bd29 100644 --- a/lib/backupstore/StoreTestUtils.h +++ b/lib/backupstore/StoreTestUtils.h @@ -114,8 +114,8 @@ bool delete_account(); } #define TEST_COMMAND_RETURNS_ERROR_OR(protocol, command, error, or_statements) \ - TEST_CHECK_THROWS_OR((protocol) . command, ConnectionException, \ - Protocol_UnexpectedReply, or_statements); \ + TEST_CHECK_THROWS_AND_OR((protocol) . command, ConnectionException, \ + Protocol_UnexpectedReply, /* and_command */, or_statements); \ TEST_PROTOCOL_ERROR_OR(protocol, error, or_statements) #define TEST_COMMAND_RETURNS_ERROR(protocol, command, error) \ -- cgit v1.2.3