summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-03-02 08:57:50 +0000
committerChris Wilson <chris+github@qwirx.com>2014-03-02 08:57:50 +0000
commit10538ac61bea69e511264c85adcfbc05e6f0f2e9 (patch)
tree61be977289cde1c587134c595710f64899137335
parent2b6ac135fa7071290289741c9e35747bb9f1012f (diff)
Simplify code
-rw-r--r--test/backupstore/testbackupstore.cpp12
1 files changed, 3 insertions, 9 deletions
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<BackupProtocolCallable> apProtocol(new
- BackupProtocolClient(open_conn("localhost", context)));
- BackupProtocolCallable& protocol(*apProtocol);
+ BackupProtocolClient protocol(open_conn("localhost", context));
// Check the version
std::auto_ptr<BackupProtocolVersion> 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<BackupProtocolCallable> apProtocol(new
- BackupProtocolClient(open_conn("localhost", context)));
- BackupProtocolCallable& protocol(*apProtocol);
+ BackupProtocolClient protocol(open_conn("localhost", context));
// Check the version
std::auto_ptr<BackupProtocolVersion> 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<BackupProtocolCallable> apProtocol =
- test_server_login("localhost", context);
- BackupProtocolCallable& protocol(*apProtocol);
+ BackupProtocolClient protocol(open_conn("localhost", context));
int64_t modtime = 0;