Formatting the code.

This commit is contained in:
Louis-Bertrand Varin 2018-03-31 16:01:30 -04:00
parent 74efc57369
commit 8324d03f0a
294 changed files with 3796 additions and 3740 deletions

View file

@ -18,10 +18,10 @@
#include "TestDeletedObjects.h"
#include "TestGlobal.h"
#include "crypto/Crypto.h"
#include "format/KeePass2.h"
#include "format/KdbxXmlReader.h"
#include "config-keepassx-tests.h"
#include "crypto/Crypto.h"
#include "format/KdbxXmlReader.h"
#include "format/KeePass2.h"
QTEST_GUILESS_MAIN(TestDeletedObjects)
@ -42,7 +42,7 @@ void TestDeletedObjects::createAndDelete(Database* db, int delObjectsSize)
g->setUuid(gUuid);
delete g;
QCOMPARE(db->deletedObjects().size(), ++delObjectsSize);
QCOMPARE(db->deletedObjects().at(delObjectsSize-1).uuid, gUuid);
QCOMPARE(db->deletedObjects().at(delObjectsSize - 1).uuid, gUuid);
QCOMPARE(rootChildrenCount, root->children().size());
Group* g1 = new Group();
@ -66,10 +66,10 @@ void TestDeletedObjects::createAndDelete(Database* db, int delObjectsSize)
delObjectsSize += 4;
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(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();
@ -80,7 +80,7 @@ void TestDeletedObjects::createAndDelete(Database* db, int delObjectsSize)
delete e3;
QCOMPARE(db->deletedObjects().size(), ++delObjectsSize);
QCOMPARE(db->deletedObjects().at(delObjectsSize-1).uuid, e3Uuid);
QCOMPARE(db->deletedObjects().at(delObjectsSize - 1).uuid, e3Uuid);
QCOMPARE(rootChildrenCount, root->children().size());
}
@ -143,8 +143,8 @@ void TestDeletedObjects::testDatabaseChange()
delObjectsSize += 2;
QCOMPARE(db->deletedObjects().size(), delObjectsSize);
QCOMPARE(db2->deletedObjects().size(), delObjectsSize2);
QCOMPARE(db->deletedObjects().at(delObjectsSize-2).uuid, e1Uuid);
QCOMPARE(db->deletedObjects().at(delObjectsSize-1).uuid, g1Uuid);
QCOMPARE(db->deletedObjects().at(delObjectsSize - 2).uuid, e1Uuid);
QCOMPARE(db->deletedObjects().at(delObjectsSize - 1).uuid, g1Uuid);
Group* group = new Group();
Entry* entry = new Entry();