[gegl-qt] Tests: Don't use QtGui for tests that don't need it
- From: Jon Nordby <jonnor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl-qt] Tests: Don't use QtGui for tests that don't need it
- Date: Sat, 27 Aug 2011 12:09:36 +0000 (UTC)
commit 3996ab84a504f30eb6062c3780a453560f1cf10f
Author: Jon Nordby <jononor gmail com>
Date: Sat Aug 27 13:46:37 2011 +0200
Tests: Don't use QtGui for tests that don't need it
Also initialize/cleanup gegl properly in test.
.../test-nodeviewimplementation.cpp | 10 ++++++++++
.../test-nodeviewimplementation.h | 2 ++
tests/tests-common.pri | 3 ++-
3 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/tests/test-nodeviewimplementation/test-nodeviewimplementation.cpp b/tests/test-nodeviewimplementation/test-nodeviewimplementation.cpp
index b9c3248..7b953da 100644
--- a/tests/test-nodeviewimplementation/test-nodeviewimplementation.cpp
+++ b/tests/test-nodeviewimplementation/test-nodeviewimplementation.cpp
@@ -34,6 +34,16 @@ TestNodeViewImplementation::TestNodeViewImplementation(QObject *parent) :
QObject(parent)
{}
+void TestNodeViewImplementation::initTestCase()
+{
+ gegl_init(NULL, NULL);
+}
+
+void TestNodeViewImplementation::cleanupTestCase()
+{
+ gegl_exit();
+}
+
void TestNodeViewImplementation::init()
{
mViewImplementation = new NodeViewImplementation();
diff --git a/tests/test-nodeviewimplementation/test-nodeviewimplementation.h b/tests/test-nodeviewimplementation/test-nodeviewimplementation.h
index 487b87b..9e8b7bf 100644
--- a/tests/test-nodeviewimplementation/test-nodeviewimplementation.h
+++ b/tests/test-nodeviewimplementation/test-nodeviewimplementation.h
@@ -15,6 +15,8 @@ public:
private Q_SLOTS:
void init();
void clean();
+ void initTestCase();
+ void cleanupTestCase();
void testSanity();
diff --git a/tests/tests-common.pri b/tests/tests-common.pri
index c21162c..950964d 100644
--- a/tests/tests-common.pri
+++ b/tests/tests-common.pri
@@ -1,7 +1,8 @@
isEmpty(GEGLQT_CONFIG):error("config.pri not included")
# This file uses variables from config.pri, so users must include config.pri before including this file
-QT += testlib
+QT += testlib core
+QT -= gui # Not all tests needs UI
CONFIG += debug
CONFIG += link_pkgconfig
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]