From f209ec8f581ae597b37f2e3a5e452e4b53b2d4c7 Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Tue, 9 Aug 2016 14:10:15 +0200 Subject: Qt: Add encryption test and refactor testsuite * lang/qt/tests/Makefile.am: Add t-encrypt and t-support. * lang/qt/tests/t-support.cpp, lang/qt/tests/t-support.c (QGpgMETest): New. Class to handle common cleanup / init. * lang/qt/tests/t-keylist.cpp, lang/qt/tests/t-keylocate.cpp, lang/qt/tests/t-ownertrust.cpp, lang/qt/tests/t-tofuinfo.cpp: Inherit QGpgMETest. * lang/qt/tests/t-encrypt.cpp: New. Test Symetric and Asymectric encryption. Mixed encryption test is disabled. --- lang/qt/tests/t-keylocate.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'lang/qt/tests/t-keylocate.cpp') diff --git a/lang/qt/tests/t-keylocate.cpp b/lang/qt/tests/t-keylocate.cpp index 5f52cc30..e75f24d8 100644 --- a/lang/qt/tests/t-keylocate.cpp +++ b/lang/qt/tests/t-keylocate.cpp @@ -37,10 +37,12 @@ #include "keylistresult.h" #include "engineinfo.h" +#include "t-support.h" + using namespace QGpgME; using namespace GpgME; -class KeyLocateTest : public QObject +class KeyLocateTest : public QGpgMETest { Q_OBJECT @@ -119,16 +121,6 @@ private Q_SLOTS: Q_ASSERT(spy.wait()); } - void initTestCase() - { - const QString gpgHome = qgetenv("GNUPGHOME"); - QVERIFY2(!gpgHome.isEmpty(), "GNUPGHOME environment variable is not set."); - } - - void cleanupTestCase() - { - QCoreApplication::sendPostedEvents(); - } private: QString mTestpattern; }; -- cgit v1.2.3