mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-03 20:47:37 +03:00
Memory management fixes in tests.
This commit is contained in:
parent
ecc11d3207
commit
bf25959b68
6 changed files with 33 additions and 20 deletions
|
@ -87,9 +87,9 @@ void TestDeletedObjects::createAndDelete(Database* db, int delObjectsSize)
|
|||
|
||||
void TestDeletedObjects::testDeletedObjectsFromFile()
|
||||
{
|
||||
KeePass2XmlReader* reader = new KeePass2XmlReader();
|
||||
KeePass2XmlReader reader;
|
||||
QString xmlFile = QString(KEEPASSX_TEST_DATA_DIR).append("/NewDatabase.xml");
|
||||
Database* db = reader->readDatabase(xmlFile);
|
||||
Database* db = reader.readDatabase(xmlFile);
|
||||
|
||||
createAndDelete(db, 2);
|
||||
|
||||
|
@ -154,6 +154,7 @@ void TestDeletedObjects::testDatabaseChange()
|
|||
QCOMPARE(db->deletedObjects().size(), delObjectsSize);
|
||||
QCOMPARE(db2->deletedObjects().size(), delObjectsSize2);
|
||||
|
||||
delete group;
|
||||
delete db;
|
||||
delete db2;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue