Add missing crypto initalization in tests.

This commit is contained in:
Felix Geyer 2011-11-12 20:00:19 +01:00
parent 9b46225937
commit ac60f7ce70
5 changed files with 17 additions and 1 deletions

View File

@ -23,10 +23,12 @@
#include "core/Database.h"
#include "core/Group.h"
#include "crypto/Crypto.h"
void TestGroup::initTestCase()
{
qRegisterMetaType<Group*>("Group*");
Crypto::init();
}
void TestGroup::testParenting()

View File

@ -20,8 +20,14 @@
#include <QtCore/QBuffer>
#include <QtTest/QTest>
#include "crypto/Crypto.h"
#include "streams/HashedBlockStream.h"
void TestHashedBlockStream::initTestCase()
{
Crypto::init();
}
void TestHashedBlockStream::testWriteRead()
{
QByteArray data = QByteArray::fromHex("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4");

View File

@ -25,6 +25,7 @@ class TestHashedBlockStream : public QObject
Q_OBJECT
private Q_SLOTS:
void initTestCase();
void testWriteRead();
};

View File

@ -17,12 +17,18 @@
#include "TestKeePass2RandomStream.h"
#include <QtTest/QTest>
#include "crypto/Crypto.h"
#include "crypto/CryptoHash.h"
#include "crypto/SymmetricCipher.h"
#include "format/KeePass2.h"
#include "format/KeePass2RandomStream.h"
#include <QtTest/QTest>
void TestKeePass2RandomStream::initTestCase()
{
Crypto::init();
}
void TestKeePass2RandomStream::test()
{

View File

@ -25,6 +25,7 @@ class TestKeePass2RandomStream : public QObject
Q_OBJECT
private Q_SLOTS:
void initTestCase();
void test();
};