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:
authorJanek Bevendorff <janek@jbev.net>2018-01-17 22:52:29 +0300
committerJanek Bevendorff <janek@jbev.net>2018-01-18 03:51:37 +0300
commita595239624dd91f40074747c0ff5995d6bafb4e3 (patch)
treebf4acef9b94c9369233bcafa0b436c4e697f468d /tests/TestKdbx4.h
parentcdefc7ea9bdfe89e86d57d3155ce35ac2347d719 (diff)
Refactor and extend file format tests
Diffstat (limited to 'tests/TestKdbx4.h')
-rw-r--r--tests/TestKdbx4.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/tests/TestKdbx4.h b/tests/TestKdbx4.h
index 0615ff3b7..59864b70e 100644
--- a/tests/TestKdbx4.h
+++ b/tests/TestKdbx4.h
@@ -18,19 +18,29 @@
#ifndef KEEPASSXC_TEST_KDBX4_H
#define KEEPASSXC_TEST_KDBX4_H
-#include "TestKeePass2XmlReader.h"
+#include "TestKeePass2Format.h"
-class TestKdbx4 : public TestKeePass2XmlReader
+class TestKdbx4 : public TestKeePass2Format
{
Q_OBJECT
private slots:
- virtual void initTestCase() override;
+ void testFormat400();
+ void testFormat400Upgrade();
+ void testFormat400Upgrade_data();
protected:
- virtual Database* readDatabase(QBuffer* buf, bool strictMode, bool& hasError, QString& errorString) override;
- virtual Database* readDatabase(QString path, bool strictMode, bool& hasError, QString& errorString) override;
- virtual void writeDatabase(QBuffer* buf, Database* db, bool& hasError, QString& errorString) override;
+ void initTestCaseImpl() override;
+
+ Database* readXml(QBuffer* buf, bool strictMode, bool& hasError, QString& errorString) override;
+ Database* readXml(const QString& path, bool strictMode, bool& hasError, QString& errorString) override;
+ void writeXml(QBuffer* buf, Database* db, bool& hasError, QString& errorString) override;
+
+ void readKdbx(const QString& path, CompositeKey const& key, QScopedPointer<Database>& db,
+ bool& hasError, QString& errorString) override;
+ void readKdbx(QIODevice* device, CompositeKey const& key, QScopedPointer<Database>& db,
+ bool& hasError, QString& errorString) override;
+ void writeKdbx(QIODevice* device, Database* db, bool& hasError, QString& errorString) override;
};
#endif // KEEPASSXC_TEST_KDBX4_H