summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-01-21 18:36:11 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-01-21 18:36:11 (GMT)
commit739e16ab8fa21f22b8ddf827b0979e71bf613e78 (patch)
tree91bf9bad8e8ade3aa9484fc01dff0221addb4cbe /Swiften/Roster
parentc632dffabdd3387547bd07cd96754deab47703bc (diff)
downloadswift-contrib-739e16ab8fa21f22b8ddf827b0979e71bf613e78.zip
swift-contrib-739e16ab8fa21f22b8ddf827b0979e71bf613e78.tar.bz2
Code cleanup.
Diffstat (limited to 'Swiften/Roster')
-rw-r--r--Swiften/Roster/UnitTest/XMPPRosterControllerTest.cpp5
-rw-r--r--Swiften/Roster/UnitTest/XMPPRosterImplTest.cpp26
2 files changed, 13 insertions, 18 deletions
diff --git a/Swiften/Roster/UnitTest/XMPPRosterControllerTest.cpp b/Swiften/Roster/UnitTest/XMPPRosterControllerTest.cpp
index a8585f1..debbd50 100644
--- a/Swiften/Roster/UnitTest/XMPPRosterControllerTest.cpp
+++ b/Swiften/Roster/UnitTest/XMPPRosterControllerTest.cpp
@@ -17,8 +17,7 @@
using namespace Swift;
-class XMPPRosterControllerTest : public CppUnit::TestFixture
-{
+class XMPPRosterControllerTest : public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE(XMPPRosterControllerTest);
CPPUNIT_TEST(testAdd);
CPPUNIT_TEST(testModify);
@@ -26,8 +25,6 @@ class XMPPRosterControllerTest : public CppUnit::TestFixture
CPPUNIT_TEST_SUITE_END();
public:
- XMPPRosterControllerTest() {}
-
void setUp() {
channel_ = new DummyIQChannel();
router_ = new IQRouter(channel_);
diff --git a/Swiften/Roster/UnitTest/XMPPRosterImplTest.cpp b/Swiften/Roster/UnitTest/XMPPRosterImplTest.cpp
index fbc3430..5f0c9fd 100644
--- a/Swiften/Roster/UnitTest/XMPPRosterImplTest.cpp
+++ b/Swiften/Roster/UnitTest/XMPPRosterImplTest.cpp
@@ -73,28 +73,18 @@ private:
};
-class XMPPRosterImplTest : public CppUnit::TestFixture
-{
+class XMPPRosterImplTest : public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE(XMPPRosterImplTest);
CPPUNIT_TEST(testJIDAdded);
CPPUNIT_TEST(testJIDRemoved);
CPPUNIT_TEST(testJIDUpdated);
CPPUNIT_TEST_SUITE_END();
- private:
- XMPPRosterImpl* roster_;
- XMPPRosterSignalHandler* handler_;
- JID jid1_;
- JID jid2_;
- JID jid3_;
- std::vector<String> groups1_;
- std::vector<String> groups2_;
-
-
public:
- XMPPRosterImplTest() : jid1_(JID("a@b.c")), jid2_(JID("b@c.d")), jid3_(JID("c@d.e")) {}
-
void setUp() {
+ jid1_ = JID("a@b.c");
+ jid2_ = JID("b@c.d");
+ jid3_ = JID("c@d.e");
roster_ = new XMPPRosterImpl();
handler_ = new XMPPRosterSignalHandler(roster_);
groups1_.push_back("bobs");
@@ -165,6 +155,14 @@ class XMPPRosterImplTest : public CppUnit::TestFixture
CPPUNIT_ASSERT(groups2_ == roster_->getGroupsForJID(jid1_));
}
+ private:
+ XMPPRosterImpl* roster_;
+ XMPPRosterSignalHandler* handler_;
+ JID jid1_;
+ JID jid2_;
+ JID jid3_;
+ std::vector<String> groups1_;
+ std::vector<String> groups2_;
};
CPPUNIT_TEST_SUITE_REGISTRATION(XMPPRosterImplTest);