Test: remove QSKIP in tst_QDBusMarshall::receiveUnknownType
authorCaroline Chao <caroline.chao@digia.com>
Tue, 16 Oct 2012 10:07:21 +0000 (12:07 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 17 Oct 2012 19:05:57 +0000 (21:05 +0200)
Omit the whole test and relative types if DBUS_TYPE_UNIX_FD is not defined
since the test is not relevant in that case (D-Bus library too old).

Change-Id: I167622f485c0f34d64984c4fa96be974e54f56bc
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp

index cdee3a7..6274e0e 100644 (file)
@@ -90,8 +90,10 @@ private slots:
     void sendCallErrors_data();
     void sendCallErrors();
 
+#ifdef DBUS_TYPE_UNIX_FD
     void receiveUnknownType_data();
     void receiveUnknownType();
+#endif
 
     void demarshallPrimitives_data();
     void demarshallPrimitives();
@@ -1028,6 +1030,8 @@ void tst_QDBusMarshall::sendCallErrors()
     QCOMPARE(reply.errorMessage(), errorMsg);
 }
 
+#ifdef DBUS_TYPE_UNIX_FD
+// If DBUS_TYPE_UNIX_FD is not defined, it means the current system's D-Bus library is too old for this test
 void tst_QDBusMarshall::receiveUnknownType_data()
 {
     QTest::addColumn<int>("receivedTypeId");
@@ -1078,9 +1082,6 @@ public:
 
 void tst_QDBusMarshall::receiveUnknownType()
 {
-#ifndef DBUS_TYPE_UNIX_FD
-    QSKIP("Your system's D-Bus library is too old for this test");
-#else
     QDBusConnection con = QDBusConnection::sessionBus();
     QVERIFY(con.isConnected());
 
@@ -1184,8 +1185,8 @@ void tst_QDBusMarshall::receiveUnknownType()
         //qDebug() << spy.list.at(0).arguments().at(0).typeName();
         QCOMPARE(spy.list.at(0).arguments().at(0).userType(), receivedTypeId);
     }
-#endif
 }
+#endif
 
 void tst_QDBusMarshall::demarshallPrimitives_data()
 {