[Telepathy-commits] [telepathy-qt4/master] Changed tests/dbus/do-nothing.cpp to inherit Test.

Andre Moreira Magalhaes (andrunko) andre.magalhaes at collabora.co.uk
Tue Jan 27 06:59:41 PST 2009


---
 tests/dbus/do-nothing.cpp |   30 ++++++++++++------------------
 1 files changed, 12 insertions(+), 18 deletions(-)

diff --git a/tests/dbus/do-nothing.cpp b/tests/dbus/do-nothing.cpp
index cceb8fd..5e45cc2 100644
--- a/tests/dbus/do-nothing.cpp
+++ b/tests/dbus/do-nothing.cpp
@@ -6,18 +6,17 @@
 
 #include <QtTest/QtTest>
 
-class TestDoNothing : public QObject
+#include <tests/lib/test.h>
+
+class TestDoNothing : public Test
 {
     Q_OBJECT
 
 public:
     TestDoNothing(QObject *parent = 0)
-        : QObject(parent), mLoop(new QEventLoop(this))
+        : Test(parent)
     { }
 
-private:
-    QEventLoop *mLoop;
-
 private slots:
     void initTestCase();
     void init();
@@ -29,42 +28,37 @@ private slots:
     void cleanupTestCase();
 };
 
-
 void TestDoNothing::initTestCase()
 {
-  QVERIFY(QDBusConnection::sessionBus().isConnected());
+    initTestCaseImpl();
 }
 
-
 void TestDoNothing::init()
 {
+    initImpl();
 }
 
-
 void TestDoNothing::doNothing()
 {
-  QTimer::singleShot(0, mLoop, SLOT(quit()));
-  QCOMPARE(mLoop->exec(), 0);
+    QTimer::singleShot(0, mLoop, SLOT(quit()));
+    QCOMPARE(mLoop->exec(), 0);
 }
 
-
 void TestDoNothing::doNothing2()
 {
-  QTimer::singleShot(0, mLoop, SLOT(quit()));
-  QCOMPARE(mLoop->exec(), 0);
+    QTimer::singleShot(0, mLoop, SLOT(quit()));
+    QCOMPARE(mLoop->exec(), 0);
 }
 
-
 void TestDoNothing::cleanup()
 {
+    cleanupImpl();
 }
 
-
 void TestDoNothing::cleanupTestCase()
 {
+    cleanupTestCaseImpl();
 }
 
-
 QTEST_MAIN(TestDoNothing)
-
 #include "_gen/do-nothing.cpp.moc.hpp"
-- 
1.5.6.5




More information about the Telepathy-commits mailing list