mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-25 22:16:01 -05:00
Clean up deleted objects test.
This commit is contained in:
parent
5dc21a191b
commit
0d80a726fa
@ -67,12 +67,12 @@ void TestDeletedObjects::createAndDelete(Database* db, int delObjectsSize)
|
|||||||
delete g1;
|
delete g1;
|
||||||
delObjectsSize += 4;
|
delObjectsSize += 4;
|
||||||
|
|
||||||
QVERIFY(db->deletedObjects().size() == delObjectsSize);
|
QCOMPARE(db->deletedObjects().size(), delObjectsSize);
|
||||||
QVERIFY(db->deletedObjects().at(delObjectsSize-4).uuid == e1Uuid);
|
QCOMPARE(db->deletedObjects().at(delObjectsSize-4).uuid, e1Uuid);
|
||||||
QVERIFY(db->deletedObjects().at(delObjectsSize-3).uuid == e2Uuid);
|
QCOMPARE(db->deletedObjects().at(delObjectsSize-3).uuid, e2Uuid);
|
||||||
QVERIFY(db->deletedObjects().at(delObjectsSize-2).uuid == g2Uuid);
|
QCOMPARE(db->deletedObjects().at(delObjectsSize-2).uuid, g2Uuid);
|
||||||
QVERIFY(db->deletedObjects().at(delObjectsSize-1).uuid == g1Uuid);
|
QCOMPARE(db->deletedObjects().at(delObjectsSize-1).uuid, g1Uuid);
|
||||||
QVERIFY(rootChildrenCount == root->children().size());
|
QCOMPARE(rootChildrenCount, root->children().size());
|
||||||
|
|
||||||
Entry* e3 = new Entry();
|
Entry* e3 = new Entry();
|
||||||
e3->setGroup(root);
|
e3->setGroup(root);
|
||||||
@ -81,11 +81,9 @@ void TestDeletedObjects::createAndDelete(Database* db, int delObjectsSize)
|
|||||||
|
|
||||||
delete e3;
|
delete e3;
|
||||||
|
|
||||||
QVERIFY(db->deletedObjects().size() == ++delObjectsSize);
|
QCOMPARE(db->deletedObjects().size(), ++delObjectsSize);
|
||||||
QVERIFY(db->deletedObjects().at(delObjectsSize-1).uuid == e3Uuid);
|
QCOMPARE(db->deletedObjects().at(delObjectsSize-1).uuid, e3Uuid);
|
||||||
QVERIFY(rootChildrenCount == root->children().size());
|
QCOMPARE(rootChildrenCount, root->children().size());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestDeletedObjects::testDeletedObjectsFromFile()
|
void TestDeletedObjects::testDeletedObjectsFromFile()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user