summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/backupstore/StoreTestUtils.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/backupstore/StoreTestUtils.h b/lib/backupstore/StoreTestUtils.h
index 39013422..7ef2ce28 100644
--- a/lib/backupstore/StoreTestUtils.h
+++ b/lib/backupstore/StoreTestUtils.h
@@ -80,10 +80,8 @@ bool create_account(int soft, int hard);
//! Deletes the standard test account, for testing behaviour with no account.
bool delete_account();
-#define TEST_COMMAND_RETURNS_ERROR_OR(protocol, command, error, or_statements) \
+#define TEST_PROTOCOL_ERROR_OR(protocol, error, or_statements) \
{ \
- TEST_CHECK_THROWS_OR(protocol . command, ConnectionException, \
- Conn_Protocol_UnexpectedReply, or_statements); \
int type, subtype; \
protocol.GetLastError(type, subtype); \
if (type == BackupProtocolError::ErrorType) \
@@ -103,6 +101,11 @@ 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_PROTOCOL_ERROR_OR(protocol, error, or_statements)
+
#define TEST_COMMAND_RETURNS_ERROR(protocol, command, error) \
TEST_COMMAND_RETURNS_ERROR_OR(protocol, command, error,)