summaryrefslogtreecommitdiffstats
path: root/tests/resourcecommunicationtest.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-03-03 09:01:05 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-03-03 09:01:05 +0100
commit4d9746c828558c9f872e0aed52442863affb25d5 (patch)
tree507d7c2ba67f47d3cbbcf01a722236ff1b48426b /tests/resourcecommunicationtest.cpp
parent9cea920b7dd51867a0be0fed2f461b6be73c103e (diff)
downloadsink-4d9746c828558c9f872e0aed52442863affb25d5.tar.gz
sink-4d9746c828558c9f872e0aed52442863affb25d5.zip
Fromatted the whole codebase with clang-format.
clang-format -i */**{.cpp,.h}
Diffstat (limited to 'tests/resourcecommunicationtest.cpp')
-rw-r--r--tests/resourcecommunicationtest.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/tests/resourcecommunicationtest.cpp b/tests/resourcecommunicationtest.cpp
index db8703e..2daf372 100644
--- a/tests/resourcecommunicationtest.cpp
+++ b/tests/resourcecommunicationtest.cpp
@@ -51,14 +51,13 @@ private slots:
51 int errors = 0; 51 int errors = 0;
52 for (int i = 0; i < count; i++) { 52 for (int i = 0; i < count; i++) {
53 auto result = resourceAccess.sendCommand(Sink::Commands::PingCommand) 53 auto result = resourceAccess.sendCommand(Sink::Commands::PingCommand)
54 .then<void>([&complete]() { 54 .then<void>([&complete]() { complete++; },
55 complete++; 55 [&errors, &complete](int error, const QString &msg) {
56 }, 56 qWarning() << msg;
57 [&errors, &complete](int error, const QString &msg) { 57 errors++;
58 qWarning() << msg; 58 complete++;
59 errors++; 59 })
60 complete++; 60 .exec();
61 }).exec();
62 } 61 }
63 QTRY_COMPARE(complete, count); 62 QTRY_COMPARE(complete, count);
64 QVERIFY(!errors); 63 QVERIFY(!errors);
@@ -77,17 +76,18 @@ private slots:
77 int errors = 0; 76 int errors = 0;
78 for (int i = 0; i < count; i++) { 77 for (int i = 0; i < count; i++) {
79 resourceAccess.sendCommand(Sink::Commands::PingCommand) 78 resourceAccess.sendCommand(Sink::Commands::PingCommand)
80 .then<void>([&complete]() { 79 .then<void>([&complete]() { complete++; },
81 complete++; 80 [&errors, &complete](int error, const QString &msg) {
82 }, 81 qWarning() << msg;
83 [&errors, &complete](int error, const QString &msg) { 82 errors++;
84 qWarning() << msg; 83 complete++;
85 errors++; 84 })
86 complete++; 85 .then<void>([&resourceAccess]() {
87 }).then<void>([&resourceAccess]() {
88 resourceAccess.close(); 86 resourceAccess.close();
89 resourceAccess.open(); 87 resourceAccess.open();
90 }).exec().waitForFinished(); 88 })
89 .exec()
90 .waitForFinished();
91 } 91 }
92 QTRY_COMPARE(complete, count); 92 QTRY_COMPARE(complete, count);
93 QVERIFY(!errors); 93 QVERIFY(!errors);