Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFelix Geyer <debfx@fobos.de>2012-04-19 00:08:22 +0400
committerFelix Geyer <debfx@fobos.de>2012-04-19 00:08:22 +0400
commit2e011d53625da1df14dd0af58961d9daf200d5c7 (patch)
tree3536bff6d6cbac3cac3a116d4b88fb2be8b6c459 /tests
parent4e5e5c71ca2b8676801c5ab65c3d00df06bfbec7 (diff)
Improve code style.
Diffstat (limited to 'tests')
-rw-r--r--tests/TestKeePass2RandomStream.cpp2
-rw-r--r--tests/TestKeePass2XmlReader.cpp4
-rw-r--r--tests/TestModified.h2
-rw-r--r--tests/TestSymmetricCipher.cpp11
-rw-r--r--tests/gui/TestGui.cpp2
5 files changed, 12 insertions, 9 deletions
diff --git a/tests/TestKeePass2RandomStream.cpp b/tests/TestKeePass2RandomStream.cpp
index cf520d1d1..5e2e381cb 100644
--- a/tests/TestKeePass2RandomStream.cpp
+++ b/tests/TestKeePass2RandomStream.cpp
@@ -52,7 +52,7 @@ void TestKeePass2RandomStream::test()
QByteArray cipherData;
cipherData.resize(SIZE);
- for (int i=0; i<SIZE; i++) {
+ for (int i = 0; i < SIZE; i++) {
cipherData[i] = data[i] ^ cipherPad[i];
}
diff --git a/tests/TestKeePass2XmlReader.cpp b/tests/TestKeePass2XmlReader.cpp
index aada1f533..146dad65b 100644
--- a/tests/TestKeePass2XmlReader.cpp
+++ b/tests/TestKeePass2XmlReader.cpp
@@ -110,8 +110,8 @@ void TestKeePass2XmlReader::testCustomIcons()
QCOMPARE(icon.width(), 16);
QCOMPARE(icon.height(), 16);
- for (int x=0; x<16; x++) {
- for (int y=0; y<16; y++) {
+ for (int x = 0; x < 16; x++) {
+ for (int y = 0; y < 16; y++) {
QRgb rgb = icon.pixel(x, y);
QCOMPARE(qRed(rgb), 128);
QCOMPARE(qGreen(rgb), 0);
diff --git a/tests/TestModified.h b/tests/TestModified.h
index ed8b20530..3f4de946c 100644
--- a/tests/TestModified.h
+++ b/tests/TestModified.h
@@ -31,4 +31,4 @@ private Q_SLOTS:
void testEntrySets();
};
-#endif
+#endif // KEEPASSX_TESTMODIFIED_H
diff --git a/tests/TestSymmetricCipher.cpp b/tests/TestSymmetricCipher.cpp
index f26c65659..7560a6765 100644
--- a/tests/TestSymmetricCipher.cpp
+++ b/tests/TestSymmetricCipher.cpp
@@ -41,14 +41,16 @@ void TestSymmetricCipher::testAes256CbcEncryption()
QByteArray cipherText = QByteArray::fromHex("f58c4c04d6e5f1ba779eabfb5f7bfbd6");
cipherText.append(QByteArray::fromHex("9cfc4e967edb808d679f777bc6702c7d"));
- SymmetricCipher cipher(SymmetricCipher::Aes256, SymmetricCipher::Cbc, SymmetricCipher::Encrypt, key, iv);
+ SymmetricCipher cipher(SymmetricCipher::Aes256, SymmetricCipher::Cbc, SymmetricCipher::Encrypt,
+ key, iv);
QCOMPARE(cipher.blockSize(), 16);
QCOMPARE(cipher.process(plainText),
cipherText);
QBuffer buffer;
- SymmetricCipherStream stream(&buffer, SymmetricCipher::Aes256, SymmetricCipher::Cbc, SymmetricCipher::Encrypt, key, iv);
+ SymmetricCipherStream stream(&buffer, SymmetricCipher::Aes256, SymmetricCipher::Cbc,
+ SymmetricCipher::Encrypt, key, iv);
buffer.open(QIODevice::WriteOnly);
stream.open(QIODevice::WriteOnly);
@@ -88,7 +90,8 @@ void TestSymmetricCipher::testAes256CbcDecryption()
plainText);
QBuffer buffer(&cipherText);
- SymmetricCipherStream stream(&buffer, SymmetricCipher::Aes256, SymmetricCipher::Cbc, SymmetricCipher::Decrypt, key, iv);
+ SymmetricCipherStream stream(&buffer, SymmetricCipher::Aes256, SymmetricCipher::Cbc,
+ SymmetricCipher::Decrypt, key, iv);
buffer.open(QIODevice::ReadOnly);
stream.open(QIODevice::ReadOnly);
@@ -118,7 +121,7 @@ void TestSymmetricCipher::testSalsa20()
SymmetricCipher cipher(SymmetricCipher::Salsa20, SymmetricCipher::Stream, SymmetricCipher::Encrypt, key, iv);
QByteArray cipherTextA;
- for (int i=0; i<8; i++) {
+ for (int i = 0; i < 8; i++) {
cipherTextA.append(cipher.process(QByteArray(64, '\0')));
}
cipher.reset();
diff --git a/tests/gui/TestGui.cpp b/tests/gui/TestGui.cpp
index d0ac3faf1..718142374 100644
--- a/tests/gui/TestGui.cpp
+++ b/tests/gui/TestGui.cpp
@@ -90,7 +90,7 @@ void TestGui::testEditEntry()
void TestGui::cleanupTestCase()
{
- delete m_mainWindow;
+ delete m_mainWindow;
}
KEEPASSX_QTEST_GUI_MAIN(TestGui)