From 1bebb9b3b5d19fd5bfcc0621658a79283e2090db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Mon, 27 Dec 2010 21:22:11 +0100
Subject: Fix destruction order in unit tests.


diff --git a/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp b/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp
index 9c1cc36..042b7c6 100644
--- a/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp
+++ b/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp
@@ -98,8 +98,8 @@ public:
 		delete mucRegistry_;
 		delete stanzaChannel_;
 		delete eventController_;
-		delete iqChannel_;
 		delete iqRouter_;
+		delete iqChannel_;
 		delete uiEventStream_;
 		delete mucManager_;
 		delete xmppRoster_;
diff --git a/Swift/Controllers/UnitTest/RosterControllerTest.cpp b/Swift/Controllers/UnitTest/RosterControllerTest.cpp
index df93ca5..fb61820 100644
--- a/Swift/Controllers/UnitTest/RosterControllerTest.cpp
+++ b/Swift/Controllers/UnitTest/RosterControllerTest.cpp
@@ -80,8 +80,8 @@ class RosterControllerTest : public CppUnit::TestFixture
 			delete mucRegistry_;
 			delete mainWindowFactory_;
 			delete avatarManager_;
-			delete channel_;
 			delete router_;
+			delete channel_;
 			delete eventController_;
 			delete subscriptionManager_;
 			delete presenceOracle_;
diff --git a/Swiften/Client/UnitTest/NickResolverTest.cpp b/Swiften/Client/UnitTest/NickResolverTest.cpp
index f4db2c1..0c5c91b 100644
--- a/Swiften/Client/UnitTest/NickResolverTest.cpp
+++ b/Swiften/Client/UnitTest/NickResolverTest.cpp
@@ -48,8 +48,8 @@ class NickResolverTest : public CppUnit::TestFixture {
 			delete resolver_;
 			delete registry_;
 			delete vCardManager_;
-			delete stanzaChannel_;
 			delete iqRouter_;
+			delete stanzaChannel_;
 			delete vCardStorage_;
 			delete xmppRoster_;
 		}
diff --git a/Swiften/Roster/UnitTest/XMPPRosterControllerTest.cpp b/Swiften/Roster/UnitTest/XMPPRosterControllerTest.cpp
index 17c5527..a8585f1 100644
--- a/Swiften/Roster/UnitTest/XMPPRosterControllerTest.cpp
+++ b/Swiften/Roster/UnitTest/XMPPRosterControllerTest.cpp
@@ -35,9 +35,9 @@ class XMPPRosterControllerTest : public CppUnit::TestFixture
 		}
 
 		void tearDown() {
-			delete channel_;
-			delete router_;
 			delete xmppRoster_;
+			delete router_;
+			delete channel_;
 		}
 
 		void testAdd() {
-- 
cgit v0.10.2-6-g49f6