summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/FileTransfer/UnitTest')
-rw-r--r--Swiften/FileTransfer/UnitTest/IBBReceiveSessionTest.cpp16
-rw-r--r--Swiften/FileTransfer/UnitTest/IBBSendSessionTest.cpp18
-rw-r--r--Swiften/FileTransfer/UnitTest/SOCKS5BytestreamServerSessionTest.cpp12
3 files changed, 23 insertions, 23 deletions
diff --git a/Swiften/FileTransfer/UnitTest/IBBReceiveSessionTest.cpp b/Swiften/FileTransfer/UnitTest/IBBReceiveSessionTest.cpp
index 01f1355..e022a5d 100644
--- a/Swiften/FileTransfer/UnitTest/IBBReceiveSessionTest.cpp
+++ b/Swiften/FileTransfer/UnitTest/IBBReceiveSessionTest.cpp
@@ -43,7 +43,7 @@ class IBBReceiveSessionTest : public CppUnit::TestFixture {
}
void testOpen() {
- std::auto_ptr<IBBReceiveSession> testling(createSession("foo@bar.com/baz", "mysession"));
+ boost::shared_ptr<IBBReceiveSession> testling(createSession("foo@bar.com/baz", "mysession"));
testling->start();
stanzaChannel->onIQReceived(createIBBRequest(IBB::createIBBOpen("mysession", 0x10), "foo@bar.com/baz", "id-open"));
@@ -54,7 +54,7 @@ class IBBReceiveSessionTest : public CppUnit::TestFixture {
}
void testReceiveData() {
- std::auto_ptr<IBBReceiveSession> testling(createSession("foo@bar.com/baz", "mysession"));
+ boost::shared_ptr<IBBReceiveSession> testling(createSession("foo@bar.com/baz", "mysession"));
testling->start();
stanzaChannel->onIQReceived(createIBBRequest(IBB::createIBBOpen("mysession", 0x10), "foo@bar.com/baz", "id-open"));
@@ -68,7 +68,7 @@ class IBBReceiveSessionTest : public CppUnit::TestFixture {
}
void testReceiveMultipleData() {
- std::auto_ptr<IBBReceiveSession> testling(createSession("foo@bar.com/baz", "mysession"));
+ boost::shared_ptr<IBBReceiveSession> testling(createSession("foo@bar.com/baz", "mysession"));
testling->start();
stanzaChannel->onIQReceived(createIBBRequest(IBB::createIBBOpen("mysession", 0x10), "foo@bar.com/baz", "id-open"));
@@ -83,7 +83,7 @@ class IBBReceiveSessionTest : public CppUnit::TestFixture {
}
void testReceiveDataForOtherSession() {
- std::auto_ptr<IBBReceiveSession> testling(createSession("foo@bar.com/baz", "mysession"));
+ boost::shared_ptr<IBBReceiveSession> testling(createSession("foo@bar.com/baz", "mysession"));
testling->start();
stanzaChannel->onIQReceived(createIBBRequest(IBB::createIBBOpen("mysession", 0x10), "foo@bar.com/baz", "id-open"));
@@ -95,7 +95,7 @@ class IBBReceiveSessionTest : public CppUnit::TestFixture {
}
void testReceiveDataOutOfOrder() {
- std::auto_ptr<IBBReceiveSession> testling(createSession("foo@bar.com/baz", "mysession"));
+ boost::shared_ptr<IBBReceiveSession> testling(createSession("foo@bar.com/baz", "mysession"));
testling->start();
stanzaChannel->onIQReceived(createIBBRequest(IBB::createIBBOpen("mysession", 0x10), "foo@bar.com/baz", "id-open"));
@@ -110,7 +110,7 @@ class IBBReceiveSessionTest : public CppUnit::TestFixture {
}
void testReceiveLastData() {
- std::auto_ptr<IBBReceiveSession> testling(createSession("foo@bar.com/baz", "mysession", 6));
+ boost::shared_ptr<IBBReceiveSession> testling(createSession("foo@bar.com/baz", "mysession", 6));
testling->start();
stanzaChannel->onIQReceived(createIBBRequest(IBB::createIBBOpen("mysession", 0x10), "foo@bar.com/baz", "id-open"));
@@ -126,7 +126,7 @@ class IBBReceiveSessionTest : public CppUnit::TestFixture {
}
void testReceiveClose() {
- std::auto_ptr<IBBReceiveSession> testling(createSession("foo@bar.com/baz", "mysession"));
+ boost::shared_ptr<IBBReceiveSession> testling(createSession("foo@bar.com/baz", "mysession"));
testling->start();
stanzaChannel->onIQReceived(createIBBRequest(IBB::createIBBOpen("mysession", 0x10), "foo@bar.com/baz", "id-open"));
@@ -139,7 +139,7 @@ class IBBReceiveSessionTest : public CppUnit::TestFixture {
}
void testStopWhileActive() {
- std::auto_ptr<IBBReceiveSession> testling(createSession("foo@bar.com/baz", "mysession"));
+ boost::shared_ptr<IBBReceiveSession> testling(createSession("foo@bar.com/baz", "mysession"));
testling->start();
stanzaChannel->onIQReceived(createIBBRequest(IBB::createIBBOpen("mysession", 0x10), "foo@bar.com/baz", "id-open"));
diff --git a/Swiften/FileTransfer/UnitTest/IBBSendSessionTest.cpp b/Swiften/FileTransfer/UnitTest/IBBSendSessionTest.cpp
index 5c23887..f84c3bb 100644
--- a/Swiften/FileTransfer/UnitTest/IBBSendSessionTest.cpp
+++ b/Swiften/FileTransfer/UnitTest/IBBSendSessionTest.cpp
@@ -41,7 +41,7 @@ class IBBSendSessionTest : public CppUnit::TestFixture {
}
void testStart() {
- std::auto_ptr<IBBSendSession> testling = createSession("foo@bar.com/baz");
+ boost::shared_ptr<IBBSendSession> testling = createSession("foo@bar.com/baz");
testling->setBlockSize(1234);
testling->start();
@@ -55,7 +55,7 @@ class IBBSendSessionTest : public CppUnit::TestFixture {
}
void testStart_ResponseStartsSending() {
- std::auto_ptr<IBBSendSession> testling = createSession("foo@bar.com/baz");
+ boost::shared_ptr<IBBSendSession> testling = createSession("foo@bar.com/baz");
testling->setBlockSize(3);
testling->start();
@@ -71,7 +71,7 @@ class IBBSendSessionTest : public CppUnit::TestFixture {
}
void testResponseContinuesSending() {
- std::auto_ptr<IBBSendSession> testling = createSession("foo@bar.com/baz");
+ boost::shared_ptr<IBBSendSession> testling = createSession("foo@bar.com/baz");
testling->setBlockSize(3);
testling->start();
stanzaChannel->onIQReceived(createIBBResult());
@@ -87,7 +87,7 @@ class IBBSendSessionTest : public CppUnit::TestFixture {
}
void testRespondToAllFinishes() {
- std::auto_ptr<IBBSendSession> testling = createSession("foo@bar.com/baz");
+ boost::shared_ptr<IBBSendSession> testling = createSession("foo@bar.com/baz");
testling->setBlockSize(3);
testling->start();
stanzaChannel->onIQReceived(createIBBResult());
@@ -100,7 +100,7 @@ class IBBSendSessionTest : public CppUnit::TestFixture {
}
void testErrorResponseFinishesWithError() {
- std::auto_ptr<IBBSendSession> testling = createSession("foo@bar.com/baz");
+ boost::shared_ptr<IBBSendSession> testling = createSession("foo@bar.com/baz");
testling->setBlockSize(3);
testling->start();
stanzaChannel->onIQReceived(IQ::createError(JID("baz@fum.com/foo"), stanzaChannel->sentStanzas[0]->getID()));
@@ -110,7 +110,7 @@ class IBBSendSessionTest : public CppUnit::TestFixture {
}
void testStopDuringSessionCloses() {
- std::auto_ptr<IBBSendSession> testling = createSession("foo@bar.com/baz");
+ boost::shared_ptr<IBBSendSession> testling = createSession("foo@bar.com/baz");
testling->setBlockSize(3);
testling->start();
testling->stop();
@@ -125,7 +125,7 @@ class IBBSendSessionTest : public CppUnit::TestFixture {
}
void testStopAfterFinishedDoesNotClose() {
- std::auto_ptr<IBBSendSession> testling = createSession("foo@bar.com/baz");
+ boost::shared_ptr<IBBSendSession> testling = createSession("foo@bar.com/baz");
testling->setBlockSize(16);
testling->start();
stanzaChannel->onIQReceived(createIBBResult());
@@ -143,8 +143,8 @@ class IBBSendSessionTest : public CppUnit::TestFixture {
}
private:
- std::auto_ptr<IBBSendSession> createSession(const std::string& to) {
- std::auto_ptr<IBBSendSession> session(new IBBSendSession("myid", JID(to), bytestream, iqRouter));
+ boost::shared_ptr<IBBSendSession> createSession(const std::string& to) {
+ boost::shared_ptr<IBBSendSession> session(new IBBSendSession("myid", JID(to), bytestream, iqRouter));
session->onFinished.connect(boost::bind(&IBBSendSessionTest::handleFinished, this, _1));
return session;
}
diff --git a/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamServerSessionTest.cpp b/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamServerSessionTest.cpp
index 9f3088c..d1f7000 100644
--- a/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamServerSessionTest.cpp
+++ b/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamServerSessionTest.cpp
@@ -44,7 +44,7 @@ class SOCKS5BytestreamServerSessionTest : public CppUnit::TestFixture {
}
void testAuthenticate() {
- std::auto_ptr<SOCKS5BytestreamServerSession> testling(createSession());
+ boost::shared_ptr<SOCKS5BytestreamServerSession> testling(createSession());
StartStopper<SOCKS5BytestreamServerSession> stopper(testling.get());
receive(ByteArray::create("\x05\x02\x01\x02"));
@@ -53,7 +53,7 @@ class SOCKS5BytestreamServerSessionTest : public CppUnit::TestFixture {
}
void testAuthenticate_Chunked() {
- std::auto_ptr<SOCKS5BytestreamServerSession> testling(createSession());
+ boost::shared_ptr<SOCKS5BytestreamServerSession> testling(createSession());
StartStopper<SOCKS5BytestreamServerSession> stopper(testling.get());
receive(ByteArray::create("\x05\x02\x01"));
@@ -64,7 +64,7 @@ class SOCKS5BytestreamServerSessionTest : public CppUnit::TestFixture {
}
void testRequest() {
- std::auto_ptr<SOCKS5BytestreamServerSession> testling(createSession());
+ boost::shared_ptr<SOCKS5BytestreamServerSession> testling(createSession());
StartStopper<SOCKS5BytestreamServerSession> stopper(testling.get());
bytestreams.addBytestream("abcdef", stream1);
authenticate();
@@ -75,7 +75,7 @@ class SOCKS5BytestreamServerSessionTest : public CppUnit::TestFixture {
}
void testRequest_UnknownBytestream() {
- std::auto_ptr<SOCKS5BytestreamServerSession> testling(createSession());
+ boost::shared_ptr<SOCKS5BytestreamServerSession> testling(createSession());
StartStopper<SOCKS5BytestreamServerSession> stopper(testling.get());
authenticate();
@@ -85,7 +85,7 @@ class SOCKS5BytestreamServerSessionTest : public CppUnit::TestFixture {
}
void testReceiveData() {
- std::auto_ptr<SOCKS5BytestreamServerSession> testling(createSession());
+ boost::shared_ptr<SOCKS5BytestreamServerSession> testling(createSession());
StartStopper<SOCKS5BytestreamServerSession> stopper(testling.get());
bytestreams.addBytestream("abcdef", stream1);
authenticate();
@@ -98,7 +98,7 @@ class SOCKS5BytestreamServerSessionTest : public CppUnit::TestFixture {
}
void testReceiveData_Chunked() {
- std::auto_ptr<SOCKS5BytestreamServerSession> testling(createSession());
+ boost::shared_ptr<SOCKS5BytestreamServerSession> testling(createSession());
testling->setChunkSize(3);
StartStopper<SOCKS5BytestreamServerSession> stopper(testling.get());
bytestreams.addBytestream("abcdef", stream1);