From 10538ac61bea69e511264c85adcfbc05e6f0f2e9 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 2 Mar 2014 08:57:50 +0000 Subject: Simplify code --- test/backupstore/testbackupstore.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'test') diff --git a/test/backupstore/testbackupstore.cpp b/test/backupstore/testbackupstore.cpp index 24144d65..a907e8dc 100644 --- a/test/backupstore/testbackupstore.cpp +++ b/test/backupstore/testbackupstore.cpp @@ -2037,9 +2037,7 @@ bool test_login_without_account() // BLOCK { // Open a connection to the server - std::auto_ptr apProtocol(new - BackupProtocolClient(open_conn("localhost", context))); - BackupProtocolCallable& protocol(*apProtocol); + BackupProtocolClient protocol(open_conn("localhost", context)); // Check the version std::auto_ptr serverVersion(protocol.QueryVersion(BACKUP_STORE_SERVER_VERSION)); @@ -2121,9 +2119,7 @@ bool test_login_with_disabled_account() // BLOCK { // Open a connection to the server - std::auto_ptr apProtocol(new - BackupProtocolClient(open_conn("localhost", context))); - BackupProtocolCallable& protocol(*apProtocol); + BackupProtocolClient protocol(open_conn("localhost", context)); // Check the version std::auto_ptr serverVersion(protocol.QueryVersion(BACKUP_STORE_SERVER_VERSION)); @@ -2305,9 +2301,7 @@ bool test_account_limits_respected() // Try to upload a file and create a directory, and check an error is generated { // Open a connection to the server - std::auto_ptr apProtocol = - test_server_login("localhost", context); - BackupProtocolCallable& protocol(*apProtocol); + BackupProtocolClient protocol(open_conn("localhost", context)); int64_t modtime = 0; -- cgit v1.2.3