diff options
Diffstat (limited to 'Swiften/Disco')
| -rw-r--r-- | Swiften/Disco/UnitTest/CapsManagerTest.cpp | 6 | ||||
| -rw-r--r-- | Swiften/Disco/UnitTest/EntityCapsManagerTest.cpp | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Swiften/Disco/UnitTest/CapsManagerTest.cpp b/Swiften/Disco/UnitTest/CapsManagerTest.cpp index 153e821..5f1aaf4 100644 --- a/Swiften/Disco/UnitTest/CapsManagerTest.cpp +++ b/Swiften/Disco/UnitTest/CapsManagerTest.cpp @@ -44,15 +44,15 @@ class CapsManagerTest : public CppUnit::TestFixture { CPPUNIT_TEST(testReconnectResetsRequests); CPPUNIT_TEST_SUITE_END(); public: void setUp() { crypto = std::shared_ptr<CryptoProvider>(PlatformCryptoProvider::create()); - stanzaChannel = std::unique_ptr<DummyStanzaChannel>(new DummyStanzaChannel()); - iqRouter = std::unique_ptr<IQRouter>(new IQRouter(stanzaChannel.get())); - storage = std::unique_ptr<CapsMemoryStorage>(new CapsMemoryStorage()); + stanzaChannel = std::make_unique<DummyStanzaChannel>(); + iqRouter = std::make_unique<IQRouter>(stanzaChannel.get()); + storage = std::make_unique<CapsMemoryStorage>(); user1 = JID("user1@bar.com/bla"); discoInfo1 = std::make_shared<DiscoInfo>(); discoInfo1->addFeature("http://swift.im/feature1"); capsInfo1 = std::make_shared<CapsInfo>(CapsInfoGenerator("http://node1.im", crypto.get()).generateCapsInfo(*discoInfo1.get())); capsInfo1alt = std::make_shared<CapsInfo>(CapsInfoGenerator("http://node2.im", crypto.get()).generateCapsInfo(*discoInfo1.get())); user2 = JID("user2@foo.com/baz"); diff --git a/Swiften/Disco/UnitTest/EntityCapsManagerTest.cpp b/Swiften/Disco/UnitTest/EntityCapsManagerTest.cpp index 8c59741..6548485 100644 --- a/Swiften/Disco/UnitTest/EntityCapsManagerTest.cpp +++ b/Swiften/Disco/UnitTest/EntityCapsManagerTest.cpp @@ -34,14 +34,14 @@ class EntityCapsManagerTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE_END(); public: void setUp() { crypto = std::shared_ptr<CryptoProvider>(PlatformCryptoProvider::create()); - stanzaChannel = std::unique_ptr<DummyStanzaChannel>(new DummyStanzaChannel()); - capsProvider = std::unique_ptr<DummyCapsProvider>(new DummyCapsProvider()); + stanzaChannel = std::make_unique<DummyStanzaChannel>(); + capsProvider = std::make_unique<DummyCapsProvider>(); user1 = JID("user1@bar.com/bla"); discoInfo1 = std::make_shared<DiscoInfo>(); discoInfo1->addFeature("http://swift.im/feature1"); capsInfo1 = std::make_shared<CapsInfo>(CapsInfoGenerator("http://node1.im", crypto.get()).generateCapsInfo(*discoInfo1.get())); capsInfo1alt = std::make_shared<CapsInfo>(CapsInfoGenerator("http://node2.im", crypto.get()).generateCapsInfo(*discoInfo1.get())); |
Swift