Skip to content

Commit b7caf78

Browse files
Apply pre-commit formatting fixes to test files
clang-format auto-formatting adjustments. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5e899a6 commit b7caf78

File tree

2 files changed

+17
-24
lines changed

2 files changed

+17
-24
lines changed

src/test/core/Coroutine_test.cpp

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -127,21 +127,20 @@ class Coroutine_test : public beast::unit_test::suite
127127

128128
for (int i = 0; i < N; ++i)
129129
{
130-
jq.postCoroTask(
131-
jtCLIENT, "CoroTest", [&, id = i](auto runner) -> CoroTask<void> {
132-
a[id] = runner;
133-
g.signal();
134-
co_await runner->suspend();
135-
136-
this->BEAST_EXPECT(*lv == -1);
137-
*lv = id;
138-
this->BEAST_EXPECT(*lv == id);
139-
g.signal();
140-
co_await runner->suspend();
141-
142-
this->BEAST_EXPECT(*lv == id);
143-
co_return;
144-
});
130+
jq.postCoroTask(jtCLIENT, "CoroTest", [&, id = i](auto runner) -> CoroTask<void> {
131+
a[id] = runner;
132+
g.signal();
133+
co_await runner->suspend();
134+
135+
this->BEAST_EXPECT(*lv == -1);
136+
*lv = id;
137+
this->BEAST_EXPECT(*lv == id);
138+
g.signal();
139+
co_await runner->suspend();
140+
141+
this->BEAST_EXPECT(*lv == id);
142+
co_return;
143+
});
145144
BEAST_EXPECT(g.wait_for(5s));
146145
a[i]->join();
147146
}

src/test/core/JobQueue_test.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ class JobQueue_test : public beast::unit_test::suite
5454
// Test repeated post()s until the coroutine completes.
5555
std::atomic<int> yieldCount{0};
5656
auto const runner = jQueue.postCoroTask(
57-
jtCLIENT,
58-
"PostCoroTest1",
59-
[&yieldCount](auto runner) -> CoroTask<void> {
57+
jtCLIENT, "PostCoroTest1", [&yieldCount](auto runner) -> CoroTask<void> {
6058
while (++yieldCount < 4)
6159
co_await runner->suspend();
6260
co_return;
@@ -84,9 +82,7 @@ class JobQueue_test : public beast::unit_test::suite
8482
// Test repeated resume()s until the coroutine completes.
8583
int yieldCount{0};
8684
auto const runner = jQueue.postCoroTask(
87-
jtCLIENT,
88-
"PostCoroTest2",
89-
[&yieldCount](auto runner) -> CoroTask<void> {
85+
jtCLIENT, "PostCoroTest2", [&yieldCount](auto runner) -> CoroTask<void> {
9086
while (++yieldCount < 4)
9187
co_await runner->suspend();
9288
co_return;
@@ -123,9 +119,7 @@ class JobQueue_test : public beast::unit_test::suite
123119
// Not recommended for the faint of heart...
124120
bool unprotected;
125121
auto const runner = jQueue.postCoroTask(
126-
jtCLIENT,
127-
"PostCoroTest3",
128-
[&unprotected](auto) -> CoroTask<void> {
122+
jtCLIENT, "PostCoroTest3", [&unprotected](auto) -> CoroTask<void> {
129123
unprotected = false;
130124
co_return;
131125
});

0 commit comments

Comments
 (0)