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:
authorJosef Vitu <josef@vitu.org>2016-10-28 19:49:51 +0300
committerJosef Vitu <josef@vitu.org>2016-10-28 19:51:09 +0300
commitad36ec4dfda686f83868c77098b4fe7831f7531e (patch)
treea8d6b4df12734a8d8674ffc3d539520d4f05ffeb /tests/TestEntry.cpp
parent82ace81974374365cab83492a4b33720248961de (diff)
Fix tests
Diffstat (limited to 'tests/TestEntry.cpp')
-rw-r--r--tests/TestEntry.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/TestEntry.cpp b/tests/TestEntry.cpp
index 1eaca3243..4d34cf31b 100644
--- a/tests/TestEntry.cpp
+++ b/tests/TestEntry.cpp
@@ -79,6 +79,8 @@ void TestEntry::testCopyDataFrom()
QCOMPARE(entry2->autoTypeAssociations()->size(), 2);
QCOMPARE(entry2->autoTypeAssociations()->get(0).window, QString("1"));
QCOMPARE(entry2->autoTypeAssociations()->get(1).window, QString("3"));
+
+ delete entry2;
}
void TestEntry::testClone()
@@ -101,6 +103,7 @@ void TestEntry::testClone()
QCOMPARE(entryCloneNone->title(), QString("New Title"));
QCOMPARE(entryCloneNone->historyItems().size(), 0);
QCOMPARE(entryCloneNone->timeInfo().creationTime(), entryOrg->timeInfo().creationTime());
+ delete entryCloneNone;
Entry* entryCloneNewUuid = entryOrg->clone(Entry::CloneNewUuid);
QVERIFY(entryCloneNewUuid->uuid() != entryOrg->uuid());
@@ -108,17 +111,22 @@ void TestEntry::testClone()
QCOMPARE(entryCloneNewUuid->title(), QString("New Title"));
QCOMPARE(entryCloneNewUuid->historyItems().size(), 0);
QCOMPARE(entryCloneNewUuid->timeInfo().creationTime(), entryOrg->timeInfo().creationTime());
+ delete entryCloneNewUuid;
Entry* entryCloneResetTime = entryOrg->clone(Entry::CloneResetTimeInfo);
- QCOMPARE(entryCloneNone->uuid(), entryOrg->uuid());
+ QCOMPARE(entryCloneResetTime->uuid(), entryOrg->uuid());
QCOMPARE(entryCloneResetTime->title(), QString("New Title"));
QCOMPARE(entryCloneResetTime->historyItems().size(), 0);
QVERIFY(entryCloneResetTime->timeInfo().creationTime() != entryOrg->timeInfo().creationTime());
+ delete entryCloneResetTime;
Entry* entryCloneHistory = entryOrg->clone(Entry::CloneIncludeHistory);
- QCOMPARE(entryCloneNone->uuid(), entryOrg->uuid());
+ QCOMPARE(entryCloneHistory->uuid(), entryOrg->uuid());
QCOMPARE(entryCloneHistory->title(), QString("New Title"));
QCOMPARE(entryCloneHistory->historyItems().size(), 1);
QCOMPARE(entryCloneHistory->historyItems().at(0)->title(), QString("Original Title"));
QCOMPARE(entryCloneHistory->timeInfo().creationTime(), entryOrg->timeInfo().creationTime());
+ delete entryCloneHistory;
+
+ delete entryOrg;
}