diff options
author | Felix Geyer <debfx@fobos.de> | 2014-06-15 13:17:40 +0400 |
---|---|---|
committer | Felix Geyer <debfx@fobos.de> | 2014-06-15 13:17:40 +0400 |
commit | 0d6117bf4c0ac1e604c5b2fa0dcf8d5d47c46a58 (patch) | |
tree | cb3421a2438fc659ffe91b31a1170832f0dbf7f0 /tests | |
parent | b417bf91873ae760031cdc821d4e411701da71f5 (diff) |
Do some basic self-checks when initializing the crypto backend.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/TestAutoType.cpp | 2 | ||||
-rw-r--r-- | tests/TestCryptoHash.cpp | 4 | ||||
-rw-r--r-- | tests/TestDeletedObjects.cpp | 2 | ||||
-rw-r--r-- | tests/TestEntry.cpp | 2 | ||||
-rw-r--r-- | tests/TestEntryModel.cpp | 2 | ||||
-rw-r--r-- | tests/TestExporter.cpp | 2 | ||||
-rw-r--r-- | tests/TestGroup.cpp | 2 | ||||
-rw-r--r-- | tests/TestGroupModel.cpp | 2 | ||||
-rw-r--r-- | tests/TestHashedBlockStream.cpp | 2 | ||||
-rw-r--r-- | tests/TestKeePass1Reader.cpp | 2 | ||||
-rw-r--r-- | tests/TestKeePass2RandomStream.cpp | 2 | ||||
-rw-r--r-- | tests/TestKeePass2Reader.cpp | 2 | ||||
-rw-r--r-- | tests/TestKeePass2Writer.cpp | 2 | ||||
-rw-r--r-- | tests/TestKeePass2XmlReader.cpp | 2 | ||||
-rw-r--r-- | tests/TestKeys.cpp | 2 | ||||
-rw-r--r-- | tests/TestModified.cpp | 2 | ||||
-rw-r--r-- | tests/TestSymmetricCipher.cpp | 2 | ||||
-rw-r--r-- | tests/gui/TestGui.cpp | 2 | ||||
-rw-r--r-- | tests/gui/TestGuiPixmaps.cpp | 2 |
19 files changed, 20 insertions, 20 deletions
diff --git a/tests/TestAutoType.cpp b/tests/TestAutoType.cpp index 4f4350e71..818f57c96 100644 --- a/tests/TestAutoType.cpp +++ b/tests/TestAutoType.cpp @@ -35,7 +35,7 @@ QTEST_GUILESS_MAIN(TestAutoType) void TestAutoType::initTestCase() { - Crypto::init(); + QVERIFY(Crypto::init()); Config::createTempFileInstance(); AutoType::createTestInstance(); config()->set("AutoTypeEntryTitleMatch", false); diff --git a/tests/TestCryptoHash.cpp b/tests/TestCryptoHash.cpp index d189d456c..eb26ca83f 100644 --- a/tests/TestCryptoHash.cpp +++ b/tests/TestCryptoHash.cpp @@ -27,13 +27,13 @@ QTEST_GUILESS_MAIN(TestCryptoHash) void TestCryptoHash::initTestCase() { - Crypto::init(); + QVERIFY(Crypto::init()); } void TestCryptoHash::test() { // TODO: move somewhere else - QVERIFY(Crypto::selfTest()); + QVERIFY(Crypto::backendSelfTest()); CryptoHash cryptoHash1(CryptoHash::Sha256); QCOMPARE(cryptoHash1.result(), diff --git a/tests/TestDeletedObjects.cpp b/tests/TestDeletedObjects.cpp index 5967e58ee..277dbcb6b 100644 --- a/tests/TestDeletedObjects.cpp +++ b/tests/TestDeletedObjects.cpp @@ -30,7 +30,7 @@ QTEST_GUILESS_MAIN(TestDeletedObjects) void TestDeletedObjects::initTestCase() { - Crypto::init(); + QVERIFY(Crypto::init()); } void TestDeletedObjects::createAndDelete(Database* db, int delObjectsSize) diff --git a/tests/TestEntry.cpp b/tests/TestEntry.cpp index 481250a20..477e83b86 100644 --- a/tests/TestEntry.cpp +++ b/tests/TestEntry.cpp @@ -27,7 +27,7 @@ QTEST_GUILESS_MAIN(TestEntry) void TestEntry::initTestCase() { - Crypto::init(); + QVERIFY(Crypto::init()); } void TestEntry::testHistoryItemDeletion() diff --git a/tests/TestEntryModel.cpp b/tests/TestEntryModel.cpp index 5347a3c52..7ba886bc2 100644 --- a/tests/TestEntryModel.cpp +++ b/tests/TestEntryModel.cpp @@ -38,7 +38,7 @@ QTEST_GUILESS_MAIN(TestEntryModel) void TestEntryModel::initTestCase() { qRegisterMetaType<QModelIndex>("QModelIndex"); - Crypto::init(); + QVERIFY(Crypto::init()); } void TestEntryModel::test() diff --git a/tests/TestExporter.cpp b/tests/TestExporter.cpp index 16b4b23cb..d703e02f1 100644 --- a/tests/TestExporter.cpp +++ b/tests/TestExporter.cpp @@ -30,7 +30,7 @@ QTEST_GUILESS_MAIN(TestExporter) void TestExporter::initTestCase() { - Crypto::init(); + QVERIFY(Crypto::init()); } void TestExporter::testToDbExporter() diff --git a/tests/TestGroup.cpp b/tests/TestGroup.cpp index 32398f01f..507cf155d 100644 --- a/tests/TestGroup.cpp +++ b/tests/TestGroup.cpp @@ -33,7 +33,7 @@ void TestGroup::initTestCase() { qRegisterMetaType<Entry*>("Entry*"); qRegisterMetaType<Group*>("Group*"); - Crypto::init(); + QVERIFY(Crypto::init()); } void TestGroup::testParenting() diff --git a/tests/TestGroupModel.cpp b/tests/TestGroupModel.cpp index fe7018e84..32a4b8e9b 100644 --- a/tests/TestGroupModel.cpp +++ b/tests/TestGroupModel.cpp @@ -32,7 +32,7 @@ QTEST_GUILESS_MAIN(TestGroupModel) void TestGroupModel::initTestCase() { qRegisterMetaType<QModelIndex>("QModelIndex"); - Crypto::init(); + QVERIFY(Crypto::init()); } void TestGroupModel::test() diff --git a/tests/TestHashedBlockStream.cpp b/tests/TestHashedBlockStream.cpp index b062908f7..09179fef2 100644 --- a/tests/TestHashedBlockStream.cpp +++ b/tests/TestHashedBlockStream.cpp @@ -28,7 +28,7 @@ QTEST_GUILESS_MAIN(TestHashedBlockStream) void TestHashedBlockStream::initTestCase() { - Crypto::init(); + QVERIFY(Crypto::init()); } void TestHashedBlockStream::testWriteRead() diff --git a/tests/TestKeePass1Reader.cpp b/tests/TestKeePass1Reader.cpp index 423087c91..249a3657b 100644 --- a/tests/TestKeePass1Reader.cpp +++ b/tests/TestKeePass1Reader.cpp @@ -37,7 +37,7 @@ QTEST_GUILESS_MAIN(TestKeePass1Reader) void TestKeePass1Reader::initTestCase() { - Crypto::init(); + QVERIFY(Crypto::init()); QString filename = QString(KEEPASSX_TEST_DATA_DIR).append("/basic.kdb"); diff --git a/tests/TestKeePass2RandomStream.cpp b/tests/TestKeePass2RandomStream.cpp index 328decb30..7963e9af8 100644 --- a/tests/TestKeePass2RandomStream.cpp +++ b/tests/TestKeePass2RandomStream.cpp @@ -30,7 +30,7 @@ QTEST_GUILESS_MAIN(TestKeePass2RandomStream) void TestKeePass2RandomStream::initTestCase() { - Crypto::init(); + QVERIFY(Crypto::init()); } void TestKeePass2RandomStream::test() diff --git a/tests/TestKeePass2Reader.cpp b/tests/TestKeePass2Reader.cpp index 3dd87c4f4..d6cb70c78 100644 --- a/tests/TestKeePass2Reader.cpp +++ b/tests/TestKeePass2Reader.cpp @@ -32,7 +32,7 @@ QTEST_GUILESS_MAIN(TestKeePass2Reader) void TestKeePass2Reader::initTestCase() { - Crypto::init(); + QVERIFY(Crypto::init()); } void TestKeePass2Reader::testNonAscii() diff --git a/tests/TestKeePass2Writer.cpp b/tests/TestKeePass2Writer.cpp index f00b38e86..cf4ab1c56 100644 --- a/tests/TestKeePass2Writer.cpp +++ b/tests/TestKeePass2Writer.cpp @@ -33,7 +33,7 @@ QTEST_GUILESS_MAIN(TestKeePass2Writer) void TestKeePass2Writer::initTestCase() { - Crypto::init(); + QVERIFY(Crypto::init()); CompositeKey key; key.addKey(PasswordKey("test")); diff --git a/tests/TestKeePass2XmlReader.cpp b/tests/TestKeePass2XmlReader.cpp index d9935804d..8e87d6744 100644 --- a/tests/TestKeePass2XmlReader.cpp +++ b/tests/TestKeePass2XmlReader.cpp @@ -68,7 +68,7 @@ QDateTime TestKeePass2XmlReader::genDT(int year, int month, int day, int hour, i void TestKeePass2XmlReader::initTestCase() { - Crypto::init(); + QVERIFY(Crypto::init()); KeePass2XmlReader reader; QString xmlFile = QString(KEEPASSX_TEST_DATA_DIR).append("/NewDatabase.xml"); diff --git a/tests/TestKeys.cpp b/tests/TestKeys.cpp index d5cba4abc..d6758d655 100644 --- a/tests/TestKeys.cpp +++ b/tests/TestKeys.cpp @@ -35,7 +35,7 @@ QTEST_GUILESS_MAIN(TestKeys) void TestKeys::initTestCase() { - Crypto::init(); + QVERIFY(Crypto::init()); } void TestKeys::testComposite() diff --git a/tests/TestModified.cpp b/tests/TestModified.cpp index 85a6bf23e..e275e837b 100644 --- a/tests/TestModified.cpp +++ b/tests/TestModified.cpp @@ -31,7 +31,7 @@ QTEST_GUILESS_MAIN(TestModified) void TestModified::initTestCase() { - Crypto::init(); + QVERIFY(Crypto::init()); } void TestModified::testSignals() diff --git a/tests/TestSymmetricCipher.cpp b/tests/TestSymmetricCipher.cpp index 9f05db1bd..6d4e94f6f 100644 --- a/tests/TestSymmetricCipher.cpp +++ b/tests/TestSymmetricCipher.cpp @@ -29,7 +29,7 @@ QTEST_GUILESS_MAIN(TestSymmetricCipher) void TestSymmetricCipher::initTestCase() { - Crypto::init(); + QVERIFY(Crypto::init()); } void TestSymmetricCipher::testAes256CbcEncryption() diff --git a/tests/gui/TestGui.cpp b/tests/gui/TestGui.cpp index 51dc39e5d..326c3497b 100644 --- a/tests/gui/TestGui.cpp +++ b/tests/gui/TestGui.cpp @@ -51,7 +51,7 @@ void TestGui::initTestCase() { - Crypto::init(); + QVERIFY(Crypto::init()); Config::createTempFileInstance(); m_mainWindow = new MainWindow(); m_tabWidget = m_mainWindow->findChild<DatabaseTabWidget*>("tabWidget"); diff --git a/tests/gui/TestGuiPixmaps.cpp b/tests/gui/TestGuiPixmaps.cpp index 401f68bc3..87e3f2488 100644 --- a/tests/gui/TestGuiPixmaps.cpp +++ b/tests/gui/TestGuiPixmaps.cpp @@ -29,7 +29,7 @@ void TestGuiPixmaps::initTestCase() { - Crypto::init(); + QVERIFY(Crypto::init()); } void TestGuiPixmaps::testDatabaseIcons() |