clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.
Change-Id: I5317fbcfbe69b8699e79b62cb855cb142a1d32c3
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/test/buffer_service_test.cpp b/test/buffer_service_test.cpp
index 602dfcc..0464bf2 100644
--- a/test/buffer_service_test.cpp
+++ b/test/buffer_service_test.cpp
@@ -38,8 +38,7 @@
struct ConfigInTest
{
Config config;
- ConfigInTest() : config()
- {}
+ ConfigInTest() : config() {}
};
class BufferServiceTest : public Test, public ConfigInTest, public BufferService
@@ -56,7 +55,7 @@
protected:
// Set hostConsole firstly read specified data and then read nothing.
- void setHostConsoleOnce(char const* data, size_t len)
+ void setHostConsoleOnce(const char* data, size_t len)
{
EXPECT_CALL(hostConsoleMock, read(_, Le(consoleReadMaxSize)))
.WillOnce(DoAll(SetArrayArgument<0>(data, data + len), Return(len)))
@@ -104,7 +103,6 @@
TEST_F(BufferServiceTest, ReadConsoleOk)
{
-
setHostConsoleOnce(firstDatagram, strlen(firstDatagram));
EXPECT_CALL(logBufferMock,
append(StrEq(firstDatagram), Eq(strlen(firstDatagram))))
diff --git a/test/file_storage_mock.hpp b/test/file_storage_mock.hpp
index 449ab29..938b319 100644
--- a/test/file_storage_mock.hpp
+++ b/test/file_storage_mock.hpp
@@ -10,7 +10,6 @@
class FileStorageMock : public FileStorage
{
public:
- FileStorageMock() : FileStorage("/tmp", "fake", -1)
- {}
+ FileStorageMock() : FileStorage("/tmp", "fake", -1) {}
MOCK_METHOD(std::string, save, (const LogBuffer& buf), (const override));
};
diff --git a/test/file_storage_test.cpp b/test/file_storage_test.cpp
index ba74bd4..9682d50 100644
--- a/test/file_storage_test.cpp
+++ b/test/file_storage_test.cpp
@@ -26,8 +26,8 @@
fs::remove_all(logPath);
}
- const fs::path logPath =
- fs::temp_directory_path() / "file_storage_test_out";
+ const fs::path logPath = fs::temp_directory_path() /
+ "file_storage_test_out";
};
TEST_F(FileStorageTest, InvalidPath)
diff --git a/test/host_console_mock.hpp b/test/host_console_mock.hpp
index 3b71c3c..fb00050 100644
--- a/test/host_console_mock.hpp
+++ b/test/host_console_mock.hpp
@@ -10,8 +10,7 @@
class HostConsoleMock : public HostConsole
{
public:
- HostConsoleMock() : HostConsole("")
- {}
+ HostConsoleMock() : HostConsole("") {}
MOCK_METHOD(void, connect, (), (override));
MOCK_METHOD(size_t, read, (char* buf, size_t sz), (const, override));
// Returns a fixed integer for testing.
diff --git a/test/log_buffer_mock.hpp b/test/log_buffer_mock.hpp
index f53fa87..b1ddd0e 100644
--- a/test/log_buffer_mock.hpp
+++ b/test/log_buffer_mock.hpp
@@ -10,8 +10,7 @@
class LogBufferMock : public LogBuffer
{
public:
- LogBufferMock() : LogBuffer(-1, -1)
- {}
+ LogBufferMock() : LogBuffer(-1, -1) {}
MOCK_METHOD(void, append, (const char* data, size_t sz), (override));
MOCK_METHOD(void, setFullHandler, (std::function<void()> cb), (override));
MOCK_METHOD(bool, empty, (), (const, override));
diff --git a/test/stream_service_test.cpp b/test/stream_service_test.cpp
index ab62c78..17ec64f 100644
--- a/test/stream_service_test.cpp
+++ b/test/stream_service_test.cpp
@@ -68,15 +68,15 @@
sa.sun_family = AF_UNIX;
memcpy(sa.sun_path, socketPath, sizeof(socketPath) - 1);
sa.sun_path[sizeof(socketPath) - 1] = '\0';
- const socklen_t len =
- sizeof(sa) - sizeof(sa.sun_path) + sizeof(socketPath) - 1;
+ const socklen_t len = sizeof(sa) - sizeof(sa.sun_path) +
+ sizeof(socketPath) - 1;
ASSERT_NE(
bind(serverSocket, reinterpret_cast<const sockaddr*>(&sa), len),
-1);
}
// Set hostConsole firstly read specified data and then read nothing.
- void setHostConsoleOnce(char const* data, size_t len)
+ void setHostConsoleOnce(const char* data, size_t len)
{
EXPECT_CALL(hostConsoleMock, read(_, Le(consoleReadMaxSize)))
.WillOnce(DoAll(SetArrayArgument<0>(data, data + len), Return(len)))