summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-07-14 19:33:05 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-07-14 19:33:05 (GMT)
commitd2625df30861a4caa984031a6990d19dfebc3367 (patch)
tree9f6b36168d2a417f0e4ef393b099428c2024223e /Swiften/Client/UnitTest
parentee3a46975986865fe5064f9d87a27277fc6c235a (diff)
downloadswift-contrib-d2625df30861a4caa984031a6990d19dfebc3367.zip
swift-contrib-d2625df30861a4caa984031a6990d19dfebc3367.tar.bz2
Make all Connection instances shared_ptrs.
Diffstat (limited to 'Swiften/Client/UnitTest')
-rw-r--r--Swiften/Client/UnitTest/SessionTest.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Swiften/Client/UnitTest/SessionTest.cpp b/Swiften/Client/UnitTest/SessionTest.cpp
index da05a06..f7f1db0 100644
--- a/Swiften/Client/UnitTest/SessionTest.cpp
+++ b/Swiften/Client/UnitTest/SessionTest.cpp
@@ -428,7 +428,7 @@ class SessionTest : public CppUnit::TestFixture {
private:
struct MockConnection;
- MockConnection* getMockServer() const {
+ boost::shared_ptr<MockConnection> getMockServer() const {
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(connectionFactory_->connections_.size()));
return connectionFactory_->connections_[0];
}
@@ -689,15 +689,15 @@ class SessionTest : public CppUnit::TestFixture {
struct MockConnectionFactory : public ConnectionFactory {
MockConnectionFactory() : fail_(false) {}
- MockConnection* createConnection() {
- MockConnection* result = new MockConnection(fail_);
+ boost::shared_ptr<Connection> createConnection() {
+ boost::shared_ptr<MockConnection> result(new MockConnection(fail_));
connections_.push_back(result);
return result;
}
void setCreateFailingConnections() {
fail_ = true;
}
- std::vector<MockConnection*> connections_;
+ std::vector<boost::shared_ptr<MockConnection> > connections_;
bool fail_;
};