Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Geyer <debfx@fobos.de>2015-09-23 00:02:41 +0300
committerFelix Geyer <debfx@fobos.de>2015-09-23 23:21:21 +0300
commitc8ae31a24838050563fd79201d29abe2aa34978d (patch)
treed358ccb87bdf9084c380e284afe409d573e70afe
parent66a01e4fef9700baa2293a20c77c30fdc2f89e2c (diff)
Remove backported Qt5 test macros.
-rw-r--r--tests/TestAutoType.cpp1
-rw-r--r--tests/TestCryptoHash.cpp1
-rw-r--r--tests/TestCsvExporter.cpp2
-rw-r--r--tests/TestDeletedObjects.cpp1
-rw-r--r--tests/TestEntry.cpp1
-rw-r--r--tests/TestEntryModel.cpp1
-rw-r--r--tests/TestEntrySearcher.cpp2
-rw-r--r--tests/TestExporter.cpp1
-rw-r--r--tests/TestGroup.cpp1
-rw-r--r--tests/TestGroupModel.cpp1
-rw-r--r--tests/TestHashedBlockStream.cpp1
-rw-r--r--tests/TestKeePass1Reader.cpp1
-rw-r--r--tests/TestKeePass2RandomStream.cpp1
-rw-r--r--tests/TestKeePass2Reader.cpp1
-rw-r--r--tests/TestKeePass2Writer.cpp1
-rw-r--r--tests/TestKeePass2XmlReader.cpp1
-rw-r--r--tests/TestKeys.cpp1
-rw-r--r--tests/TestModified.cpp1
-rw-r--r--tests/TestRandom.cpp1
-rw-r--r--tests/TestSymmetricCipher.cpp1
-rw-r--r--tests/TestWildcardMatcher.cpp1
-rw-r--r--tests/gui/TestGui.cpp1
-rw-r--r--tests/gui/TestGuiPixmaps.cpp1
-rw-r--r--tests/tests.h72
24 files changed, 0 insertions, 97 deletions
diff --git a/tests/TestAutoType.cpp b/tests/TestAutoType.cpp
index d18f4f66e..3d4a66304 100644
--- a/tests/TestAutoType.cpp
+++ b/tests/TestAutoType.cpp
@@ -20,7 +20,6 @@
#include <QPluginLoader>
#include <QTest>
-#include "tests.h"
#include "core/Config.h"
#include "core/FilePath.h"
#include "core/Entry.h"
diff --git a/tests/TestCryptoHash.cpp b/tests/TestCryptoHash.cpp
index 4002aea6b..c166f5595 100644
--- a/tests/TestCryptoHash.cpp
+++ b/tests/TestCryptoHash.cpp
@@ -19,7 +19,6 @@
#include <QTest>
-#include "tests.h"
#include "crypto/Crypto.h"
#include "crypto/CryptoHash.h"
diff --git a/tests/TestCsvExporter.cpp b/tests/TestCsvExporter.cpp
index 5965e605f..3304d6953 100644
--- a/tests/TestCsvExporter.cpp
+++ b/tests/TestCsvExporter.cpp
@@ -21,8 +21,6 @@
#include <QBuffer>
#include <QTest>
-#include "tests.h"
-
#include "core/Database.h"
#include "core/Entry.h"
#include "core/Group.h"
diff --git a/tests/TestDeletedObjects.cpp b/tests/TestDeletedObjects.cpp
index cf9e3d104..5af017885 100644
--- a/tests/TestDeletedObjects.cpp
+++ b/tests/TestDeletedObjects.cpp
@@ -19,7 +19,6 @@
#include <QTest>
-#include "tests.h"
#include "core/Database.h"
#include "core/Group.h"
#include "crypto/Crypto.h"
diff --git a/tests/TestEntry.cpp b/tests/TestEntry.cpp
index 477e83b86..53d68b5e0 100644
--- a/tests/TestEntry.cpp
+++ b/tests/TestEntry.cpp
@@ -19,7 +19,6 @@
#include <QTest>
-#include "tests.h"
#include "core/Entry.h"
#include "crypto/Crypto.h"
diff --git a/tests/TestEntryModel.cpp b/tests/TestEntryModel.cpp
index 7ba886bc2..6186a3511 100644
--- a/tests/TestEntryModel.cpp
+++ b/tests/TestEntryModel.cpp
@@ -21,7 +21,6 @@
#include <QTest>
#include "modeltest.h"
-#include "tests.h"
#include "core/DatabaseIcons.h"
#include "core/Entry.h"
#include "core/Group.h"
diff --git a/tests/TestEntrySearcher.cpp b/tests/TestEntrySearcher.cpp
index 9f7ca1397..6b951c703 100644
--- a/tests/TestEntrySearcher.cpp
+++ b/tests/TestEntrySearcher.cpp
@@ -19,8 +19,6 @@
#include <QTest>
-#include "tests.h"
-
QTEST_GUILESS_MAIN(TestEntrySearcher)
void TestEntrySearcher::initTestCase()
diff --git a/tests/TestExporter.cpp b/tests/TestExporter.cpp
index d703e02f1..46319bc3e 100644
--- a/tests/TestExporter.cpp
+++ b/tests/TestExporter.cpp
@@ -20,7 +20,6 @@
#include <QTest>
-#include "tests.h"
#include "core/ToDbExporter.h"
#include "core/Group.h"
#include "core/Metadata.h"
diff --git a/tests/TestGroup.cpp b/tests/TestGroup.cpp
index 507cf155d..13ce82ea5 100644
--- a/tests/TestGroup.cpp
+++ b/tests/TestGroup.cpp
@@ -21,7 +21,6 @@
#include <QSignalSpy>
#include <QTest>
-#include "tests.h"
#include "core/Database.h"
#include "core/Group.h"
#include "core/Metadata.h"
diff --git a/tests/TestGroupModel.cpp b/tests/TestGroupModel.cpp
index 32a4b8e9b..3608cc475 100644
--- a/tests/TestGroupModel.cpp
+++ b/tests/TestGroupModel.cpp
@@ -21,7 +21,6 @@
#include <QTest>
#include "modeltest.h"
-#include "tests.h"
#include "core/Database.h"
#include "core/Group.h"
#include "crypto/Crypto.h"
diff --git a/tests/TestHashedBlockStream.cpp b/tests/TestHashedBlockStream.cpp
index d5a0ceaf0..b78a46ba8 100644
--- a/tests/TestHashedBlockStream.cpp
+++ b/tests/TestHashedBlockStream.cpp
@@ -20,7 +20,6 @@
#include <QBuffer>
#include <QTest>
-#include "tests.h"
#include "FailDevice.h"
#include "crypto/Crypto.h"
#include "streams/HashedBlockStream.h"
diff --git a/tests/TestKeePass1Reader.cpp b/tests/TestKeePass1Reader.cpp
index 249a3657b..14eb5f48c 100644
--- a/tests/TestKeePass1Reader.cpp
+++ b/tests/TestKeePass1Reader.cpp
@@ -21,7 +21,6 @@
#include <QTest>
#include "config-keepassx-tests.h"
-#include "tests.h"
#include "core/Database.h"
#include "core/Entry.h"
#include "core/Group.h"
diff --git a/tests/TestKeePass2RandomStream.cpp b/tests/TestKeePass2RandomStream.cpp
index cb8813371..03dfbe507 100644
--- a/tests/TestKeePass2RandomStream.cpp
+++ b/tests/TestKeePass2RandomStream.cpp
@@ -19,7 +19,6 @@
#include <QTest>
-#include "tests.h"
#include "crypto/Crypto.h"
#include "crypto/CryptoHash.h"
#include "crypto/SymmetricCipher.h"
diff --git a/tests/TestKeePass2Reader.cpp b/tests/TestKeePass2Reader.cpp
index d6cb70c78..22973ee00 100644
--- a/tests/TestKeePass2Reader.cpp
+++ b/tests/TestKeePass2Reader.cpp
@@ -20,7 +20,6 @@
#include <QTest>
#include "config-keepassx-tests.h"
-#include "tests.h"
#include "core/Database.h"
#include "core/Group.h"
#include "core/Metadata.h"
diff --git a/tests/TestKeePass2Writer.cpp b/tests/TestKeePass2Writer.cpp
index fd478a875..d120458b4 100644
--- a/tests/TestKeePass2Writer.cpp
+++ b/tests/TestKeePass2Writer.cpp
@@ -20,7 +20,6 @@
#include <QBuffer>
#include <QTest>
-#include "tests.h"
#include "FailDevice.h"
#include "core/Database.h"
#include "core/Group.h"
diff --git a/tests/TestKeePass2XmlReader.cpp b/tests/TestKeePass2XmlReader.cpp
index ff94e9a6d..0f9676f5d 100644
--- a/tests/TestKeePass2XmlReader.cpp
+++ b/tests/TestKeePass2XmlReader.cpp
@@ -20,7 +20,6 @@
#include <QFile>
#include <QTest>
-#include "tests.h"
#include "core/Database.h"
#include "core/Group.h"
#include "core/Metadata.h"
diff --git a/tests/TestKeys.cpp b/tests/TestKeys.cpp
index abd137f5c..4e53d5445 100644
--- a/tests/TestKeys.cpp
+++ b/tests/TestKeys.cpp
@@ -21,7 +21,6 @@
#include <QTest>
#include "config-keepassx-tests.h"
-#include "tests.h"
#include "core/Database.h"
#include "core/Metadata.h"
#include "crypto/Crypto.h"
diff --git a/tests/TestModified.cpp b/tests/TestModified.cpp
index b057feeaa..70a4a4844 100644
--- a/tests/TestModified.cpp
+++ b/tests/TestModified.cpp
@@ -20,7 +20,6 @@
#include <QSignalSpy>
#include <QTest>
-#include "tests.h"
#include "core/Database.h"
#include "core/Group.h"
#include "core/Metadata.h"
diff --git a/tests/TestRandom.cpp b/tests/TestRandom.cpp
index b37b5ced3..6c5b1f724 100644
--- a/tests/TestRandom.cpp
+++ b/tests/TestRandom.cpp
@@ -17,7 +17,6 @@
#include "TestRandom.h"
-#include "tests.h"
#include "core/Endian.h"
#include "core/Global.h"
diff --git a/tests/TestSymmetricCipher.cpp b/tests/TestSymmetricCipher.cpp
index 578d25016..698ecb204 100644
--- a/tests/TestSymmetricCipher.cpp
+++ b/tests/TestSymmetricCipher.cpp
@@ -20,7 +20,6 @@
#include <QBuffer>
#include <QTest>
-#include "tests.h"
#include "crypto/Crypto.h"
#include "crypto/SymmetricCipher.h"
#include "streams/SymmetricCipherStream.h"
diff --git a/tests/TestWildcardMatcher.cpp b/tests/TestWildcardMatcher.cpp
index dc9991db9..dffe1c854 100644
--- a/tests/TestWildcardMatcher.cpp
+++ b/tests/TestWildcardMatcher.cpp
@@ -19,7 +19,6 @@
#include <QTest>
-#include "tests.h"
#include "autotype/WildcardMatcher.h"
QTEST_GUILESS_MAIN(TestWildcardMatcher)
diff --git a/tests/gui/TestGui.cpp b/tests/gui/TestGui.cpp
index 549d03702..5eb8f6f21 100644
--- a/tests/gui/TestGui.cpp
+++ b/tests/gui/TestGui.cpp
@@ -30,7 +30,6 @@
#include <QToolButton>
#include "config-keepassx-tests.h"
-#include "tests.h"
#include "core/Config.h"
#include "core/Database.h"
#include "core/Entry.h"
diff --git a/tests/gui/TestGuiPixmaps.cpp b/tests/gui/TestGuiPixmaps.cpp
index 87e3f2488..363749474 100644
--- a/tests/gui/TestGuiPixmaps.cpp
+++ b/tests/gui/TestGuiPixmaps.cpp
@@ -19,7 +19,6 @@
#include <QTest>
-#include "tests.h"
#include "core/Database.h"
#include "core/DatabaseIcons.h"
#include "core/Entry.h"
diff --git a/tests/tests.h b/tests/tests.h
deleted file mode 100644
index e719a0bff..000000000
--- a/tests/tests.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2011 Felix Geyer <debfx@fobos.de>
- * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 or (at your option)
- * version 3 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef KEEPASSX_TESTS_H
-#define KEEPASSX_TESTS_H
-
-#include <QTest>
-
-// backport QTEST_GUILESS_MAIN, QTRY_VERIFY and QTRY_COMPARE from Qt 5
-
-#ifndef QTEST_GUILESS_MAIN
-#define QTEST_GUILESS_MAIN(TestObject) \
-int main(int argc, char* argv[]) \
-{ \
- QCoreApplication app(argc, argv); \
- TestObject tc; \
- return QTest::qExec(&tc, argc, argv); \
-}
-#endif // QTEST_GUILESS_MAIN
-
-
-#ifndef QTRY_VERIFY
-#define KEEPASSX_VERIFY_WITH_TIMEOUT(__expr, __timeout) \
-do { \
- const int __step = 50; \
- const int __timeoutValue = __timeout; \
- if (!(__expr)) { \
- QTest::qWait(0); \
- } \
- for (int __i = 0; __i < __timeoutValue && !(__expr); __i+=__step) { \
- QTest::qWait(__step); \
- } \
- QVERIFY(__expr); \
-} while (0)
-
-#define QTRY_VERIFY(__expr) KEEPASSX_VERIFY_WITH_TIMEOUT(__expr, 5000)
-#endif // QTRY_VERIFY
-
-
-#ifndef QTRY_COMPARE
-#define KEEPASSX_COMPARE_WITH_TIMEOUT(__expr, __expected, __timeout) \
-do { \
- const int __step = 50; \
- const int __timeoutValue = __timeout; \
- if ((__expr) != (__expected)) { \
- QTest::qWait(0); \
- } \
- for (int __i = 0; __i < __timeoutValue && ((__expr) != (__expected)); __i+=__step) { \
- QTest::qWait(__step); \
- } \
- QCOMPARE(__expr, __expected); \
-} while (0)
-
-#define QTRY_COMPARE(__expr, __expected) KEEPASSX_COMPARE_WITH_TIMEOUT(__expr, __expected, 5000)
-#endif // QTRY_COMPARE
-
-#endif // KEEPASSX_TESTS_H