aboutsummaryrefslogtreecommitdiffstats
path: root/lang/qt/tests/t-support.h
diff options
context:
space:
mode:
authorAndre Heinecke <[email protected]>2016-08-09 12:10:15 +0000
committerAndre Heinecke <[email protected]>2016-08-09 12:23:51 +0000
commitf209ec8f581ae597b37f2e3a5e452e4b53b2d4c7 (patch)
tree810a34c62c736aa302cb4e955086d96bf7276b0e /lang/qt/tests/t-support.h
parentQt: Add support for EncryptJobs with generic flags (diff)
downloadgpgme-f209ec8f581ae597b37f2e3a5e452e4b53b2d4c7.tar.gz
gpgme-f209ec8f581ae597b37f2e3a5e452e4b53b2d4c7.zip
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.
Diffstat (limited to 'lang/qt/tests/t-support.h')
-rw-r--r--lang/qt/tests/t-support.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/lang/qt/tests/t-support.h b/lang/qt/tests/t-support.h
index 8755b998..cf0cb26e 100644
--- a/lang/qt/tests/t-support.h
+++ b/lang/qt/tests/t-support.h
@@ -28,9 +28,14 @@
you do not wish to do so, delete this exception statement from
your version.
*/
+#ifndef T_SUPPORT_H
+#define T_SUPPORT_H
#include "interfaces/passphraseprovider.h"
#include <QtGlobal>
+#include <QProcess>
+#include <QCoreApplication>
+#include <QObject>
namespace GpgME
{
@@ -43,5 +48,17 @@ public:
return strdup("abc");
}
};
-
} // namespace GpgME
+
+void killAgent(const QString &dir = qgetenv("GNUPGHOME"));
+
+class QGpgMETest : public QObject
+{
+ Q_OBJECT
+
+public Q_SLOTS:
+ void initTestCase();
+ void cleanupTestCase();
+};
+
+#endif // T_SUPPORT_H