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

@ -20,8 +20,8 @@
#include "core/Metadata.h"
#include "crypto/Crypto.h"
#include "keys/PasswordKey.h"
#include "format/KdbxXmlReader.h"
#include "keys/PasswordKey.h"
#include "FailDevice.h"
#include "config-keepassx-tests.h"
@ -402,11 +402,15 @@ void TestKeePass2Format::testXmlInvalidXmlChars()
{
QScopedPointer<Database> dbWrite(new Database());
QString strPlainInvalid = QString().append(QChar(0x02)).append(QChar(0x19))
.append(QChar(0xFFFE)).append(QChar(0xFFFF));
QString strPlainValid = QString().append(QChar(0x09)).append(QChar(0x0A))
.append(QChar(0x20)).append(QChar(0xD7FF))
.append(QChar(0xE000)).append(QChar(0xFFFD));
QString strPlainInvalid =
QString().append(QChar(0x02)).append(QChar(0x19)).append(QChar(0xFFFE)).append(QChar(0xFFFF));
QString strPlainValid = QString()
.append(QChar(0x09))
.append(QChar(0x0A))
.append(QChar(0x20))
.append(QChar(0xD7FF))
.append(QChar(0xE000))
.append(QChar(0xFFFD));
// U+10437 in UTF-16: D801 DC37
// high low surrogate
QString strSingleHighSurrogate1 = QString().append(QChar(0xD801));
@ -416,8 +420,8 @@ void TestKeePass2Format::testXmlInvalidXmlChars()
QString strSingleLowSurrogate2 = QString().append(QChar((0x31))).append(QChar(0xDC37)).append(QChar(0x32));
QString strLowLowSurrogate = QString().append(QChar(0xDC37)).append(QChar(0xDC37));
QString strSurrogateValid1 = QString().append(QChar(0xD801)).append(QChar(0xDC37));
QString strSurrogateValid2 = QString().append(QChar(0x31)).append(QChar(0xD801)).append(QChar(0xDC37))
.append(QChar(0x32));
QString strSurrogateValid2 =
QString().append(QChar(0x31)).append(QChar(0xD801)).append(QChar(0xDC37)).append(QChar(0x32));
auto entry = new Entry();
entry->setUuid(Uuid::random());
@ -532,7 +536,8 @@ void TestKeePass2Format::testKdbxAttachments()
void TestKeePass2Format::testKdbxNonAsciiPasswords()
{
QCOMPARE(m_kdbxTargetDb->rootGroup()->entries()[0]->password(), m_kdbxSourceDb->rootGroup()->entries()[0]->password());
QCOMPARE(m_kdbxTargetDb->rootGroup()->entries()[0]->password(),
m_kdbxSourceDb->rootGroup()->entries()[0]->password());
}
void TestKeePass2Format::testKdbxDeviceFailure()