From 59dfda627da51e5b275775a407f132276b45e638 Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Fri, 2 Nov 2012 12:39:28 +0100 Subject: Fixed tests code to avoid crash if dbus session is not avaliable. --- tests/client/actiongrouptest.cpp | 2 +- tests/client/menuchangestest.cpp | 2 +- tests/client/modeltest.cpp | 2 +- tests/client/qmltest.cpp | 3 +-- tests/client/servicetest.cpp | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/client/actiongrouptest.cpp b/tests/client/actiongrouptest.cpp index 116bd44..5f1bf60 100644 --- a/tests/client/actiongrouptest.cpp +++ b/tests/client/actiongrouptest.cpp @@ -38,7 +38,7 @@ private: private Q_SLOTS: void initTestCase() { - Q_ASSERT(m_script.connect()); + QVERIFY(m_script.connect()); } void cleanupTestCase() diff --git a/tests/client/menuchangestest.cpp b/tests/client/menuchangestest.cpp index 2015582..6ef5879 100644 --- a/tests/client/menuchangestest.cpp +++ b/tests/client/menuchangestest.cpp @@ -35,7 +35,7 @@ private: private Q_SLOTS: void initTestCase() { - Q_ASSERT(m_script.connect()); + QVERIFY(m_script.connect()); } void cleanupTestCase() diff --git a/tests/client/modeltest.cpp b/tests/client/modeltest.cpp index 93677db..2cb64b0 100644 --- a/tests/client/modeltest.cpp +++ b/tests/client/modeltest.cpp @@ -35,7 +35,7 @@ private: private Q_SLOTS: void initTestCase() { - Q_ASSERT(m_script.connect()); + QVERIFY(m_script.connect()); } void cleanupTestCase() diff --git a/tests/client/qmltest.cpp b/tests/client/qmltest.cpp index 4e6f288..ce77f6f 100644 --- a/tests/client/qmltest.cpp +++ b/tests/client/qmltest.cpp @@ -44,8 +44,7 @@ private: private Q_SLOTS: void initTestCase() { - g_type_init(); - Q_ASSERT(m_script.connect()); + QVERIFY(m_script.connect()); } void cleanupTestCase() diff --git a/tests/client/servicetest.cpp b/tests/client/servicetest.cpp index a8b0c2a..4d238c4 100644 --- a/tests/client/servicetest.cpp +++ b/tests/client/servicetest.cpp @@ -42,7 +42,7 @@ private: private Q_SLOTS: void initTestCase() { - Q_ASSERT(m_script.connect()); + QVERIFY(m_script.connect()); } void cleanupTestCase() -- cgit v1.2.3