[Telepathy-commits] [telepathy-qt4/master] Changed tests/dbus/cm-basics.cpp to have init/cleanup and create/destroy a cm for each test.

Andre Moreira Magalhaes (andrunko) andre.magalhaes at collabora.co.uk
Tue Jan 27 07:23:11 PST 2009


---
 tests/dbus/cm-basics.cpp |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/tests/dbus/cm-basics.cpp b/tests/dbus/cm-basics.cpp
index 692ca7c..69d0a92 100644
--- a/tests/dbus/cm-basics.cpp
+++ b/tests/dbus/cm-basics.cpp
@@ -27,9 +27,11 @@ public:
 
 private Q_SLOTS:
     void initTestCase();
+    void init();
 
     void testBasics();
 
+    void cleanup();
     void cleanupTestCase();
 
 private:
@@ -50,6 +52,11 @@ void TestCmBasics::initTestCase()
         NULL));
     QVERIFY(mCMService != 0);
     QVERIFY(tp_base_connection_manager_register(mCMService));
+}
+
+void TestCmBasics::init()
+{
+    initImpl();
 
     mCM = new ConnectionManager("simple");
     QCOMPARE(mCM->isReady(), false);
@@ -94,13 +101,18 @@ void TestCmBasics::testBasics()
     QCOMPARE(mCM->supportedProtocols(), QStringList() << "simple");
 }
 
-void TestCmBasics::cleanupTestCase()
+void TestCmBasics::cleanup()
 {
     if (mCM) {
         delete mCM;
         mCM = 0;
     }
 
+    cleanupImpl();
+}
+
+void TestCmBasics::cleanupTestCase()
+{
     if (mCMService) {
         g_object_unref(mCMService);
         mCMService = 0;
-- 
1.5.6.5




More information about the Telepathy-commits mailing list