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:
authorJonathan White <support@dmapps.us>2020-01-08 06:06:31 +0300
committerJonathan White <support@dmapps.us>2020-02-02 16:46:18 +0300
commitc663b5d5fcc3ed9f5af8d6e5e7fdf1e99f4a2c58 (patch)
tree834f1d30fc3f1990fe1ee973660df1b18199bf1a /tests
parentc4270001842512084e670c07eb68dbde00ffb170 (diff)
Add braces around single line statements
* Ran clang-tidy with "readability-braces-around-statements" to find missing braces around statements.
Diffstat (limited to 'tests')
-rw-r--r--tests/TestCsvParser.cpp3
-rw-r--r--tests/TestSymmetricCipher.cpp12
-rw-r--r--tests/TestYkChallengeResponseKey.cpp6
3 files changed, 14 insertions, 7 deletions
diff --git a/tests/TestCsvParser.cpp b/tests/TestCsvParser.cpp
index f31e30414..758c31ecc 100644
--- a/tests/TestCsvParser.cpp
+++ b/tests/TestCsvParser.cpp
@@ -30,8 +30,9 @@ void TestCsvParser::initTestCase()
void TestCsvParser::init()
{
file.reset(new QTemporaryFile());
- if (not file->open())
+ if (not file->open()) {
QFAIL("Cannot open file!");
+ }
parser->setBackslashSyntax(false);
parser->setComment('#');
parser->setFieldSeparator(',');
diff --git a/tests/TestSymmetricCipher.cpp b/tests/TestSymmetricCipher.cpp
index 752fc09df..173f328ee 100644
--- a/tests/TestSymmetricCipher.cpp
+++ b/tests/TestSymmetricCipher.cpp
@@ -289,14 +289,16 @@ void TestSymmetricCipher::testTwofish256CbcEncryption()
QCOMPARE(cipher.blockSize(), 16);
for (int j = 0; j < 5000; ++j) {
ctCur = cipher.process(ptNext, &ok);
- if (!ok)
+ if (!ok) {
break;
+ }
ptNext = ctPrev;
ctPrev = ctCur;
ctCur = cipher.process(ptNext, &ok);
- if (!ok)
+ if (!ok) {
break;
+ }
ptNext = ctPrev;
ctPrev = ctCur;
}
@@ -342,13 +344,15 @@ void TestSymmetricCipher::testTwofish256CbcDecryption()
QCOMPARE(cipher.blockSize(), 16);
for (int j = 0; j < 5000; ++j) {
ptCur = cipher.process(ctNext, &ok);
- if (!ok)
+ if (!ok) {
break;
+ }
ctNext = ptCur;
ptCur = cipher.process(ctNext, &ok);
- if (!ok)
+ if (!ok) {
break;
+ }
ctNext = ptCur;
}
diff --git a/tests/TestYkChallengeResponseKey.cpp b/tests/TestYkChallengeResponseKey.cpp
index 0d6f9b5c3..a4dd76270 100644
--- a/tests/TestYkChallengeResponseKey.cpp
+++ b/tests/TestYkChallengeResponseKey.cpp
@@ -84,12 +84,14 @@ void TestYubiKeyChalResp::ykDetected(int slot, bool blocking)
{
Q_UNUSED(blocking);
- if (slot > 0)
+ if (slot > 0) {
m_detected++;
+ }
/* Key used for later testing */
- if (!m_key)
+ if (!m_key) {
m_key.reset(new YkChallengeResponseKey(slot, blocking));
+ }
}
void TestYubiKeyChalResp::deinit()