mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Rename KEEPASSX_QTEST_CORE_MAIN to QTEST_GUILESS_MAIN which is available in Qt 5.
This commit is contained in:
parent
2185afefed
commit
6b13d18137
@ -48,4 +48,4 @@ void TestCryptoHash::test()
|
||||
QByteArray::fromHex("0b56e5f65263e747af4a833bd7dd7ad26a64d7a4de7c68e52364893dca0766b4"));
|
||||
}
|
||||
|
||||
KEEPASSX_QTEST_CORE_MAIN(TestCryptoHash)
|
||||
QTEST_GUILESS_MAIN(TestCryptoHash)
|
||||
|
@ -159,4 +159,4 @@ void TestDeletedObjects::testDatabaseChange()
|
||||
delete db2;
|
||||
}
|
||||
|
||||
KEEPASSX_QTEST_CORE_MAIN(TestDeletedObjects)
|
||||
QTEST_GUILESS_MAIN(TestDeletedObjects)
|
||||
|
@ -311,4 +311,4 @@ void TestEntryModel::testProxyModel()
|
||||
delete db;
|
||||
}
|
||||
|
||||
KEEPASSX_QTEST_CORE_MAIN(TestEntryModel)
|
||||
QTEST_GUILESS_MAIN(TestEntryModel)
|
||||
|
@ -399,4 +399,4 @@ void TestGroup::testSearch()
|
||||
delete groupRoot;
|
||||
}
|
||||
|
||||
KEEPASSX_QTEST_CORE_MAIN(TestGroup)
|
||||
QTEST_GUILESS_MAIN(TestGroup)
|
||||
|
@ -150,4 +150,4 @@ void TestGroupModel::test()
|
||||
delete model;
|
||||
}
|
||||
|
||||
KEEPASSX_QTEST_CORE_MAIN(TestGroupModel)
|
||||
QTEST_GUILESS_MAIN(TestGroupModel)
|
||||
|
@ -70,4 +70,4 @@ void TestHashedBlockStream::testWriteRead()
|
||||
buffer.buffer().clear();
|
||||
}
|
||||
|
||||
KEEPASSX_QTEST_CORE_MAIN(TestHashedBlockStream)
|
||||
QTEST_GUILESS_MAIN(TestHashedBlockStream)
|
||||
|
@ -293,4 +293,4 @@ void TestKeePass1Reader::reopenDatabase(Database* db, const QString& password, c
|
||||
delete newDb;
|
||||
}
|
||||
|
||||
KEEPASSX_QTEST_CORE_MAIN(TestKeePass1Reader)
|
||||
QTEST_GUILESS_MAIN(TestKeePass1Reader)
|
||||
|
@ -78,4 +78,4 @@ void TestKeePass2RandomStream::test()
|
||||
QCOMPARE(randomStreamData, cipherData);
|
||||
}
|
||||
|
||||
KEEPASSX_QTEST_CORE_MAIN(TestKeePass2RandomStream)
|
||||
QTEST_GUILESS_MAIN(TestKeePass2RandomStream)
|
||||
|
@ -121,4 +121,4 @@ void TestKeePass2Reader::testFormat200()
|
||||
delete db;
|
||||
}
|
||||
|
||||
KEEPASSX_QTEST_CORE_MAIN(TestKeePass2Reader)
|
||||
QTEST_GUILESS_MAIN(TestKeePass2Reader)
|
||||
|
@ -105,4 +105,4 @@ void TestKeePass2Writer::cleanupTestCase()
|
||||
delete m_dbTest;
|
||||
}
|
||||
|
||||
KEEPASSX_QTEST_CORE_MAIN(TestKeePass2Writer)
|
||||
QTEST_GUILESS_MAIN(TestKeePass2Writer)
|
||||
|
@ -356,4 +356,4 @@ void TestKeePass2XmlReader::cleanupTestCase()
|
||||
delete m_db;
|
||||
}
|
||||
|
||||
KEEPASSX_QTEST_CORE_MAIN(TestKeePass2XmlReader)
|
||||
QTEST_GUILESS_MAIN(TestKeePass2XmlReader)
|
||||
|
@ -165,4 +165,4 @@ void TestKeys::testFileKeyError()
|
||||
errorMsg = "";
|
||||
}
|
||||
|
||||
KEEPASSX_QTEST_CORE_MAIN(TestKeys)
|
||||
QTEST_GUILESS_MAIN(TestKeys)
|
||||
|
@ -467,4 +467,4 @@ void TestModified::testHistoryItem()
|
||||
delete db;
|
||||
}
|
||||
|
||||
KEEPASSX_QTEST_CORE_MAIN(TestModified)
|
||||
QTEST_GUILESS_MAIN(TestModified)
|
||||
|
@ -195,4 +195,4 @@ QString TestQSaveFile::tmpDir()
|
||||
return dirName;
|
||||
}
|
||||
|
||||
KEEPASSX_QTEST_CORE_MAIN(TestQSaveFile)
|
||||
QTEST_GUILESS_MAIN(TestQSaveFile)
|
||||
|
@ -193,4 +193,4 @@ void TestSymmetricCipher::testPadding()
|
||||
QCOMPARE(decrypted, plainText);
|
||||
}
|
||||
|
||||
KEEPASSX_QTEST_CORE_MAIN(TestSymmetricCipher)
|
||||
QTEST_GUILESS_MAIN(TestSymmetricCipher)
|
||||
|
@ -83,4 +83,4 @@ void TestWildcardMatcher::verifyNoMatch(QString pattern)
|
||||
QVERIFY(!matchResult);
|
||||
}
|
||||
|
||||
KEEPASSX_QTEST_CORE_MAIN(TestWildcardMatcher)
|
||||
QTEST_GUILESS_MAIN(TestWildcardMatcher)
|
||||
|
@ -380,4 +380,4 @@ void TestGui::dragAndDropGroup(const QModelIndex& sourceIndex, const QModelIndex
|
||||
QCOMPARE(group->parentGroup()->children().indexOf(group), expectedPos);
|
||||
}
|
||||
|
||||
KEEPASSX_QTEST_GUI_MAIN(TestGui)
|
||||
QTEST_MAIN(TestGui)
|
||||
|
@ -147,4 +147,4 @@ void TestGuiPixmaps::compareImages(const QPixmap& pixmap, const QImage& image)
|
||||
image.convertToFormat(QImage::Format_ARGB32_Premultiplied));
|
||||
}
|
||||
|
||||
KEEPASSX_QTEST_GUI_MAIN(TestGuiPixmaps)
|
||||
QTEST_MAIN(TestGuiPixmaps)
|
||||
|
@ -21,19 +21,18 @@
|
||||
|
||||
#include <QtTest/QTest>
|
||||
|
||||
#define KEEPASSX_QTEST_CORE_MAIN(TestObject) \
|
||||
// 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
|
||||
|
||||
// just for the sake of a consistent naming scheme
|
||||
#define KEEPASSX_QTEST_GUI_MAIN QTEST_MAIN
|
||||
|
||||
|
||||
// backport QTRY_VERIFY and QTRY_COMPARE from Qt 5
|
||||
|
||||
#ifndef QTRY_VERIFY
|
||||
#define KEEPASSX_VERIFY_WITH_TIMEOUT(__expr, __timeout) \
|
||||
@ -52,6 +51,7 @@ do { \
|
||||
#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 { \
|
||||
|
Loading…
Reference in New Issue
Block a user