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:
authorFlorian Geyer <blueice@fobos.de>2013-03-25 00:34:54 +0400
committerFlorian Geyer <blueice@fobos.de>2013-03-25 00:57:34 +0400
commit57b0c177337c430e417416bdb5ce95101833bcb5 (patch)
treedd03ee16c4ee24958fa613c53e18c50690a9183c /tests/TestEntry.cpp
parent6ee781a6088a0dede19c54f5c6b2ac14acf2a3d3 (diff)
Improve entry test.
Diffstat (limited to 'tests/TestEntry.cpp')
-rw-r--r--tests/TestEntry.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/TestEntry.cpp b/tests/TestEntry.cpp
index 49f5d65a7..c7e143fdf 100644
--- a/tests/TestEntry.cpp
+++ b/tests/TestEntry.cpp
@@ -25,7 +25,7 @@
void TestEntry::testHistoryItemDeletion()
{
Entry* entry = new Entry();
- Entry* historyEntry = new Entry();
+ QPointer<Entry> historyEntry = new Entry();
entry->addHistoryItem(historyEntry);
QCOMPARE(entry->historyItems().size(), 1);
@@ -34,6 +34,9 @@ void TestEntry::testHistoryItemDeletion()
historyEntriesToRemove.append(historyEntry);
entry->removeHistoryItems(historyEntriesToRemove);
QCOMPARE(entry->historyItems().size(), 0);
+ QVERIFY(historyEntry.isNull());
+
+ delete entry;
}
QTEST_GUILESS_MAIN(TestEntry)