mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-25 15:29:44 -05:00
Add missing crypto initalization in tests.
This commit is contained in:
parent
9b46225937
commit
ac60f7ce70
@ -23,10 +23,12 @@
|
|||||||
|
|
||||||
#include "core/Database.h"
|
#include "core/Database.h"
|
||||||
#include "core/Group.h"
|
#include "core/Group.h"
|
||||||
|
#include "crypto/Crypto.h"
|
||||||
|
|
||||||
void TestGroup::initTestCase()
|
void TestGroup::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<Group*>("Group*");
|
qRegisterMetaType<Group*>("Group*");
|
||||||
|
Crypto::init();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestGroup::testParenting()
|
void TestGroup::testParenting()
|
||||||
|
@ -20,8 +20,14 @@
|
|||||||
#include <QtCore/QBuffer>
|
#include <QtCore/QBuffer>
|
||||||
#include <QtTest/QTest>
|
#include <QtTest/QTest>
|
||||||
|
|
||||||
|
#include "crypto/Crypto.h"
|
||||||
#include "streams/HashedBlockStream.h"
|
#include "streams/HashedBlockStream.h"
|
||||||
|
|
||||||
|
void TestHashedBlockStream::initTestCase()
|
||||||
|
{
|
||||||
|
Crypto::init();
|
||||||
|
}
|
||||||
|
|
||||||
void TestHashedBlockStream::testWriteRead()
|
void TestHashedBlockStream::testWriteRead()
|
||||||
{
|
{
|
||||||
QByteArray data = QByteArray::fromHex("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4");
|
QByteArray data = QByteArray::fromHex("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4");
|
||||||
|
@ -25,6 +25,7 @@ class TestHashedBlockStream : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
|
void initTestCase();
|
||||||
void testWriteRead();
|
void testWriteRead();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -17,12 +17,18 @@
|
|||||||
|
|
||||||
#include "TestKeePass2RandomStream.h"
|
#include "TestKeePass2RandomStream.h"
|
||||||
|
|
||||||
|
#include <QtTest/QTest>
|
||||||
|
|
||||||
|
#include "crypto/Crypto.h"
|
||||||
#include "crypto/CryptoHash.h"
|
#include "crypto/CryptoHash.h"
|
||||||
#include "crypto/SymmetricCipher.h"
|
#include "crypto/SymmetricCipher.h"
|
||||||
#include "format/KeePass2.h"
|
#include "format/KeePass2.h"
|
||||||
#include "format/KeePass2RandomStream.h"
|
#include "format/KeePass2RandomStream.h"
|
||||||
|
|
||||||
#include <QtTest/QTest>
|
void TestKeePass2RandomStream::initTestCase()
|
||||||
|
{
|
||||||
|
Crypto::init();
|
||||||
|
}
|
||||||
|
|
||||||
void TestKeePass2RandomStream::test()
|
void TestKeePass2RandomStream::test()
|
||||||
{
|
{
|
||||||
|
@ -25,6 +25,7 @@ class TestKeePass2RandomStream : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
|
void initTestCase();
|
||||||
void test();
|
void test();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user