Move to clang-format-16 (#908)

Fixes #848
This commit is contained in:
Alex Kremer
2023-10-19 16:55:04 +01:00
committed by GitHub
parent 5de87b9ef8
commit 1aab2b94b1
265 changed files with 3950 additions and 4743 deletions

View File

@@ -29,11 +29,9 @@ using namespace data::cassandra;
using namespace data::cassandra::detail;
using namespace testing;
class BackendCassandraAsyncExecutorTest : public SyncAsioContextTest
{
class BackendCassandraAsyncExecutorTest : public SyncAsioContextTest {
protected:
struct CallbackMock
{
struct CallbackMock {
MOCK_METHOD(void, onComplete, (FakeResultOrError));
MOCK_METHOD(void, onRetry, ());
};
@@ -64,7 +62,8 @@ TEST_F(BackendCassandraAsyncExecutorTest, CompletionCalledOnSuccess)
callbackMock_.onComplete(std::move(resultOrError));
work.reset();
},
std::move(onRetry_));
std::move(onRetry_)
);
ctx.run();
}
@@ -78,12 +77,9 @@ TEST_F(BackendCassandraAsyncExecutorTest, ExecutedMultipleTimesByRetryPolicyOnMa
ON_CALL(handle, asyncExecute(An<FakeStatement const&>(), An<std::function<void(FakeResultOrError)>&&>()))
.WillByDefault([&callCount](auto const&, auto&& cb) {
++callCount;
if (callCount >= 3)
{
if (callCount >= 3) {
cb({});
}
else
{
} else {
cb({CassandraError{"timeout", CASS_ERROR_LIB_REQUEST_TIMED_OUT}});
}
@@ -104,7 +100,8 @@ TEST_F(BackendCassandraAsyncExecutorTest, ExecutedMultipleTimesByRetryPolicyOnMa
callbackMock_.onComplete(std::move(resultOrError));
work.reset();
},
std::move(onRetry_));
std::move(onRetry_)
);
ctx.run();
ASSERT_EQ(callCount, 3);
@@ -123,12 +120,9 @@ TEST_F(BackendCassandraAsyncExecutorTest, ExecutedMultipleTimesByRetryPolicyOnOt
ON_CALL(handle, asyncExecute(An<FakeStatement const&>(), An<std::function<void(FakeResultOrError)>&&>()))
.WillByDefault([&callCount](auto const&, auto&& cb) {
++callCount;
if (callCount >= 3)
{
if (callCount >= 3) {
cb({});
}
else
{
} else {
cb({CassandraError{"timeout", CASS_ERROR_LIB_REQUEST_TIMED_OUT}});
}
@@ -150,7 +144,8 @@ TEST_F(BackendCassandraAsyncExecutorTest, ExecutedMultipleTimesByRetryPolicyOnOt
work.reset();
work2.reset();
},
std::move(onRetry_));
std::move(onRetry_)
);
ctx.run();
EXPECT_EQ(callCount, 3);
@@ -187,7 +182,8 @@ TEST_F(BackendCassandraAsyncExecutorTest, CompletionCalledOnFailureAfterRetryCou
callbackMock_.onComplete(std::move(res));
work.reset();
},
std::move(onRetry_));
std::move(onRetry_)
);
ctx.run();
}