diff options
| author | Joanna Hulboj <joanna.hulboj@isode.com> | 2017-04-28 13:52:47 (GMT) | 
|---|---|---|
| committer | Kevin Smith <kevin.smith@isode.com> | 2017-07-07 16:23:08 (GMT) | 
| commit | f68d574ff04162e98e16a636c66ab6de5960e875 (patch) | |
| tree | 0248d9450a8bb6aa6731067d9f921791d9d4deaa /Swift/Controllers/Roster/UnitTest | |
| parent | d89b27b8796f89c847c280dacfb1b09fd6cb6731 (diff) | |
| download | swift-f68d574ff04162e98e16a636c66ab6de5960e875.zip swift-f68d574ff04162e98e16a636c66ab6de5960e875.tar.bz2 | |
Make std:: make_unique available in gcc with c++11
Test-Information:
Unit tests pass OK on Windows 10 and CentOS 7.3.
Change-Id: I33c9eb6b3e6409727350a44e6d5c88c5e8907275
Diffstat (limited to 'Swift/Controllers/Roster/UnitTest')
| -rw-r--r-- | Swift/Controllers/Roster/UnitTest/RosterControllerTest.cpp | 6 | ||||
| -rw-r--r-- | Swift/Controllers/Roster/UnitTest/RosterTest.cpp | 2 | ||||
| -rw-r--r-- | Swift/Controllers/Roster/UnitTest/TableRosterTest.cpp | 4 | 
3 files changed, 6 insertions, 6 deletions
| diff --git a/Swift/Controllers/Roster/UnitTest/RosterControllerTest.cpp b/Swift/Controllers/Roster/UnitTest/RosterControllerTest.cpp index 2f15fb5..9b64def 100644 --- a/Swift/Controllers/Roster/UnitTest/RosterControllerTest.cpp +++ b/Swift/Controllers/Roster/UnitTest/RosterControllerTest.cpp @@ -72,7 +72,7 @@ class RosterControllerTest : public CppUnit::TestFixture {              mainWindowFactory_ = new MockMainWindowFactory();              mucRegistry_ = new MUCRegistry();              crypto_ = PlatformCryptoProvider::create(); -            storages_ = std::unique_ptr<MemoryStorages>(new MemoryStorages(crypto_)); +            storages_ = std::make_unique<MemoryStorages>(crypto_);              nickResolver_ = new NickResolver(jid_.toBare(), xmppRoster_, nullptr, mucRegistry_);              channel_ = new DummyIQChannel();              router_ = new IQRouter(channel_); @@ -83,7 +83,7 @@ class RosterControllerTest : public CppUnit::TestFixture {              uiEventStream_ = new UIEventStream();              settings_ = new DummySettingsProvider();              nickManager_ = new DummyNickManager(); -            capsManager_ = std::unique_ptr<CapsManager>(new CapsManager(storages_->getCapsStorage(), stanzaChannel_, router_, crypto_)); +            capsManager_ = std::make_unique<CapsManager>(storages_->getCapsStorage(), stanzaChannel_, router_, crypto_);              entityCapsManager_ = new EntityCapsManager(capsManager_.get(), stanzaChannel_);              jingleSessionManager_ = new JingleSessionManager(router_); @@ -92,7 +92,7 @@ class RosterControllerTest : public CppUnit::TestFixture {              vcardManager_ = new VCardManager(jid_, router_, vcardStorage_);              rosterController_ = new RosterController(jid_, xmppRoster_, avatarManager_, mainWindowFactory_, nickManager_, nickResolver_, presenceOracle_, subscriptionManager_, eventController_, uiEventStream_, router_, settings_, entityCapsManager_, clientBlockListManager_, vcardManager_);              mainWindow_ = mainWindowFactory_->last; -            capsInfoGenerator_ = std::unique_ptr<CapsInfoGenerator>(new CapsInfoGenerator("", crypto_)); +            capsInfoGenerator_ = std::make_unique<CapsInfoGenerator>("", crypto_);          }          void tearDown() { diff --git a/Swift/Controllers/Roster/UnitTest/RosterTest.cpp b/Swift/Controllers/Roster/UnitTest/RosterTest.cpp index 5f500d4..045a5e4 100644 --- a/Swift/Controllers/Roster/UnitTest/RosterTest.cpp +++ b/Swift/Controllers/Roster/UnitTest/RosterTest.cpp @@ -30,7 +30,7 @@ class RosterTest : public CppUnit::TestFixture {              jid1_ = JID("a@b.c");              jid2_ = JID("b@c.d");              jid3_ = JID("c@d.e"); -            roster_ = std::unique_ptr<Roster>(new Roster()); +            roster_ = std::make_unique<Roster>();          }          void testGetGroup() { diff --git a/Swift/Controllers/Roster/UnitTest/TableRosterTest.cpp b/Swift/Controllers/Roster/UnitTest/TableRosterTest.cpp index ddc8785..7ebce17 100644 --- a/Swift/Controllers/Roster/UnitTest/TableRosterTest.cpp +++ b/Swift/Controllers/Roster/UnitTest/TableRosterTest.cpp @@ -34,8 +34,8 @@ class TableRosterTest : public CppUnit::TestFixture {      public:          void setUp() { -            timerFactory = std::unique_ptr<DummyTimerFactory>(new DummyTimerFactory()); -            roster = std::unique_ptr<Roster>(new Roster()); +            timerFactory = std::make_unique<DummyTimerFactory>(); +            roster = std::make_unique<Roster>();              jid1 = JID("jid1@example.com");              jid2 = JID("jid2@example.com");          } | 
 Swift
 Swift