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
diff options
context:
space:
mode:
authorJonathan White <support@dmapps.us>2019-01-20 17:50:20 +0300
committerJonathan White <support@dmapps.us>2019-01-29 06:38:59 +0300
commit7e1b16250c8a3b7854030c86af941d0b83d4a0b9 (patch)
tree83fe30abc4e1e22f6ae5891cb2bf354e0dc90260 /tests/TestSharing.cpp
parentc74664097b010b1c463011ec6ea07fd5c392a178 (diff)
Performed project-wide code formatting
* Updated format CMake command to properly ignore new directories and files * Added output when command is run * Resolves #2623
Diffstat (limited to 'tests/TestSharing.cpp')
-rw-r--r--tests/TestSharing.cpp46
1 files changed, 22 insertions, 24 deletions
diff --git a/tests/TestSharing.cpp b/tests/TestSharing.cpp
index beff9f15e..c1188ed14 100644
--- a/tests/TestSharing.cpp
+++ b/tests/TestSharing.cpp
@@ -145,11 +145,8 @@ void TestSharing::testCertificateSerialization()
const OpenSSHKey& key = stubkey();
KeeShareSettings::ScopedCertificate original;
original.path = "/path";
- original.certificate = KeeShareSettings::Certificate
- {
- OpenSSHKey::serializeToBinary(OpenSSHKey::Public, key),
- "Some <!> &#_\"\" weird string"
- };
+ original.certificate = KeeShareSettings::Certificate{OpenSSHKey::serializeToBinary(OpenSSHKey::Public, key),
+ "Some <!> &#_\"\" weird string"};
original.trust = trusted;
QString buffer;
@@ -230,10 +227,12 @@ void TestSharing::testReferenceSerialization_data()
QTest::addColumn<QString>("path");
QTest::addColumn<QUuid>("uuid");
QTest::addColumn<int>("type");
- QTest::newRow("1") << "Password" << "/some/path" << QUuid::createUuid() << int(KeeShareSettings::Inactive);
- QTest::newRow("2") << "" << "" << QUuid() << int(KeeShareSettings::SynchronizeWith);
- QTest::newRow("3") << "" << "/some/path" << QUuid() << int(KeeShareSettings::ExportTo);
-
+ QTest::newRow("1") << "Password"
+ << "/some/path" << QUuid::createUuid() << int(KeeShareSettings::Inactive);
+ QTest::newRow("2") << ""
+ << "" << QUuid() << int(KeeShareSettings::SynchronizeWith);
+ QTest::newRow("3") << ""
+ << "/some/path" << QUuid() << int(KeeShareSettings::ExportTo);
}
void TestSharing::testSettingsSerialization()
@@ -277,11 +276,8 @@ void TestSharing::testSettingsSerialization_data()
const OpenSSHKey& sshKey0 = stubkey(0);
KeeShareSettings::ScopedCertificate certificate0;
certificate0.path = "/path/0";
- certificate0.certificate = KeeShareSettings::Certificate
- {
- OpenSSHKey::serializeToBinary(OpenSSHKey::Public, sshKey0),
- "Some <!> &#_\"\" weird string"
- };
+ certificate0.certificate = KeeShareSettings::Certificate{OpenSSHKey::serializeToBinary(OpenSSHKey::Public, sshKey0),
+ "Some <!> &#_\"\" weird string"};
certificate0.trust = KeeShareSettings::Trust::Trusted;
KeeShareSettings::Key key0;
@@ -290,11 +286,8 @@ void TestSharing::testSettingsSerialization_data()
const OpenSSHKey& sshKey1 = stubkey(1);
KeeShareSettings::ScopedCertificate certificate1;
certificate1.path = "/path/1";
- certificate1.certificate = KeeShareSettings::Certificate
- {
- OpenSSHKey::serializeToBinary(OpenSSHKey::Public, sshKey1),
- "Another "
- };
+ certificate1.certificate =
+ KeeShareSettings::Certificate{OpenSSHKey::serializeToBinary(OpenSSHKey::Public, sshKey1), "Another "};
certificate1.trust = KeeShareSettings::Trust::Untrusted;
QTest::addColumn<bool>("importing");
@@ -302,11 +295,16 @@ void TestSharing::testSettingsSerialization_data()
QTest::addColumn<KeeShareSettings::Certificate>("ownCertificate");
QTest::addColumn<KeeShareSettings::Key>("ownKey");
QTest::addColumn<QList<KeeShareSettings::ScopedCertificate>>("foreignCertificates");
- QTest::newRow("1") << false << false << KeeShareSettings::Certificate() << KeeShareSettings::Key() << QList<KeeShareSettings::ScopedCertificate>();
- QTest::newRow("2") << true << false << KeeShareSettings::Certificate() << KeeShareSettings::Key() << QList<KeeShareSettings::ScopedCertificate>();
- QTest::newRow("3") << true << true << KeeShareSettings::Certificate() << KeeShareSettings::Key() << QList<KeeShareSettings::ScopedCertificate>({ certificate0, certificate1 });
- QTest::newRow("4") << false << true << certificate0.certificate << key0 << QList<KeeShareSettings::ScopedCertificate>();
- QTest::newRow("5") << false << false << certificate0.certificate << key0 << QList<KeeShareSettings::ScopedCertificate>({ certificate1 });
+ QTest::newRow("1") << false << false << KeeShareSettings::Certificate() << KeeShareSettings::Key()
+ << QList<KeeShareSettings::ScopedCertificate>();
+ QTest::newRow("2") << true << false << KeeShareSettings::Certificate() << KeeShareSettings::Key()
+ << QList<KeeShareSettings::ScopedCertificate>();
+ QTest::newRow("3") << true << true << KeeShareSettings::Certificate() << KeeShareSettings::Key()
+ << QList<KeeShareSettings::ScopedCertificate>({certificate0, certificate1});
+ QTest::newRow("4") << false << true << certificate0.certificate << key0
+ << QList<KeeShareSettings::ScopedCertificate>();
+ QTest::newRow("5") << false << false << certificate0.certificate << key0
+ << QList<KeeShareSettings::ScopedCertificate>({certificate1});
}
const OpenSSHKey& TestSharing::stubkey(int index)