Clean up deleted objects test.

This commit is contained in:
Florian Geyer 2012-04-21 23:35:18 +02:00 committed by Felix Geyer
parent 5dc21a191b
commit 0d80a726fa

View File

@ -67,12 +67,12 @@ void TestDeletedObjects::createAndDelete(Database* db, int delObjectsSize)
delete g1;
delObjectsSize += 4;
QVERIFY(db->deletedObjects().size() == delObjectsSize);
QVERIFY(db->deletedObjects().at(delObjectsSize-4).uuid == e1Uuid);
QVERIFY(db->deletedObjects().at(delObjectsSize-3).uuid == e2Uuid);
QVERIFY(db->deletedObjects().at(delObjectsSize-2).uuid == g2Uuid);
QVERIFY(db->deletedObjects().at(delObjectsSize-1).uuid == g1Uuid);
QVERIFY(rootChildrenCount == root->children().size());
QCOMPARE(db->deletedObjects().size(), delObjectsSize);
QCOMPARE(db->deletedObjects().at(delObjectsSize-4).uuid, e1Uuid);
QCOMPARE(db->deletedObjects().at(delObjectsSize-3).uuid, e2Uuid);
QCOMPARE(db->deletedObjects().at(delObjectsSize-2).uuid, g2Uuid);
QCOMPARE(db->deletedObjects().at(delObjectsSize-1).uuid, g1Uuid);
QCOMPARE(rootChildrenCount, root->children().size());
Entry* e3 = new Entry();
e3->setGroup(root);
@ -81,11 +81,9 @@ void TestDeletedObjects::createAndDelete(Database* db, int delObjectsSize)
delete e3;
QVERIFY(db->deletedObjects().size() == ++delObjectsSize);
QVERIFY(db->deletedObjects().at(delObjectsSize-1).uuid == e3Uuid);
QVERIFY(rootChildrenCount == root->children().size());
QCOMPARE(db->deletedObjects().size(), ++delObjectsSize);
QCOMPARE(db->deletedObjects().at(delObjectsSize-1).uuid, e3Uuid);
QCOMPARE(rootChildrenCount, root->children().size());
}
void TestDeletedObjects::testDeletedObjectsFromFile()