Skip to content

Commit a91efa8

Browse files
committed
Check if clang-format 14 in docker is consistent
1 parent 8a68874 commit a91efa8

File tree

3 files changed

+185
-54
lines changed

3 files changed

+185
-54
lines changed

tests/timers.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ TEST_CASE("timers add/execute", "[timers]")
2222
using namespace std::chrono_literals;
2323
zmq::timers timers;
2424
bool handler_ran = false;
25-
timers.add(4ms, [](auto, void *arg) { *(bool *) arg = true; }, &handler_ran);
25+
timers.add(
26+
4ms, [](auto, void *arg) { *(bool *) arg = true; }, &handler_ran);
2627
CHECK(timers.timeout().has_value());
2728
CHECK(!handler_ran);
2829
std::this_thread::sleep_for(10ms);
@@ -35,8 +36,8 @@ TEST_CASE("timers add/cancel", "[timers]")
3536
using namespace std::chrono_literals;
3637
zmq::timers timers;
3738
bool handler_ran = false;
38-
auto id =
39-
timers.add(4ms, [](auto, void *arg) { *(bool *) arg = true; }, &handler_ran);
39+
auto id = timers.add(
40+
4ms, [](auto, void *arg) { *(bool *) arg = true; }, &handler_ran);
4041
CHECK(timers.timeout().has_value());
4142
CHECK(!handler_ran);
4243
timers.cancel(id);
@@ -50,8 +51,8 @@ TEST_CASE("timers set_interval", "[timers]")
5051
zmq::timers timers;
5152
bool handler_ran = false;
5253
// Interval of 4 hours should never run like this
53-
auto id =
54-
timers.add(4h, [](auto, void *arg) { *(bool *) arg = true; }, &handler_ran);
54+
auto id = timers.add(
55+
4h, [](auto, void *arg) { *(bool *) arg = true; }, &handler_ran);
5556
CHECK(timers.timeout().has_value());
5657
CHECK(!handler_ran);
5758
// Change the interval to 4ms and wait for it to timeout
@@ -66,8 +67,8 @@ TEST_CASE("timers reset", "[timers]")
6667
using namespace std::chrono_literals;
6768
zmq::timers timers;
6869
bool handler_ran = false;
69-
auto id =
70-
timers.add(4ms, [](auto, void *arg) { *(bool *) arg = true; }, &handler_ran);
70+
auto id = timers.add(
71+
4ms, [](auto, void *arg) { *(bool *) arg = true; }, &handler_ran);
7172
CHECK(timers.timeout().has_value());
7273
std::this_thread::sleep_for(10ms);
7374
// Available to be executed but we reset it

0 commit comments

Comments
 (0)