clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I09e19a126d456dc184fd70e82d4e4e4217fa8ee7
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/tools/test/tools_net_unittest.cpp b/tools/test/tools_net_unittest.cpp
index cb8776f..8c88ba9 100644
--- a/tools/test/tools_net_unittest.cpp
+++ b/tools/test/tools_net_unittest.cpp
@@ -134,9 +134,9 @@
EXPECT_CALL(sysMock, socket(AF_INET6, SOCK_STREAM, 0))
.WillOnce(Return(connFd));
EXPECT_CALL(sysMock, close(connFd)).WillOnce(Return(0));
- EXPECT_CALL(
- sysMock,
- connect(connFd, reinterpret_cast<struct sockaddr*>(&sa), sizeof(sa)))
+ EXPECT_CALL(sysMock,
+ connect(connFd, reinterpret_cast<struct sockaddr*>(&sa),
+ sizeof(sa)))
.WillOnce(SetErrnoAndReturn(ECONNREFUSED, -1));
EXPECT_FALSE(handler.sendContents(filePath, session));
@@ -232,9 +232,9 @@
InSequence seq;
EXPECT_CALL(sysMock, sendfile(connFd, inFd, _, _))
.WillOnce([](int, int, off_t*, size_t) {
- errno = EINVAL;
- return -1;
- });
+ errno = EINVAL;
+ return -1;
+ });
std::vector<uint8_t> chunk(chunkSize);
for (std::uint32_t offset = 0; offset < fakeFileSize;
@@ -246,16 +246,16 @@
}
EXPECT_CALL(sysMock, read(inFd, _, Ge(chunkSize)))
.WillOnce([chunk](int, void* buf, size_t) {
- memcpy(buf, chunk.data(), chunkSize);
- return chunkSize;
- });
+ memcpy(buf, chunk.data(), chunkSize);
+ return chunkSize;
+ });
EXPECT_CALL(sysMock, send(connFd, _, chunkSize, 0))
.WillOnce([chunk](int, const void* data, size_t len, int) {
- std::vector<uint8_t> dcopy(len);
- memcpy(dcopy.data(), data, len);
- EXPECT_THAT(dcopy, ContainerEq(chunk));
- return chunkSize;
- });
+ std::vector<uint8_t> dcopy(len);
+ memcpy(dcopy.data(), data, len);
+ EXPECT_THAT(dcopy, ContainerEq(chunk));
+ return chunkSize;
+ });
EXPECT_CALL(blobMock,
writeBytes(session, offset, ContainerEq(chunkBytes)));
EXPECT_CALL(progMock, updateProgress(chunkSize));