From 6a335fcca28693aa9039ad4e8a13ff71e9d2f9cd Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 12 Jun 2026 17:49:43 +0200 Subject: unify my .clang-format files --- test/unit_tests/fixtures.hpp | 12 +++++++++--- test/unit_tests/resource_ids.h | 4 ++-- test/unit_tests/shared/command.hpp | 9 +++++++-- test/unit_tests/shared/console.hpp | 28 +++++++++++++++++++++------- 4 files changed, 39 insertions(+), 14 deletions(-) (limited to 'test/unit_tests') diff --git a/test/unit_tests/fixtures.hpp b/test/unit_tests/fixtures.hpp index f3e8a8e..ce8e1f4 100644 --- a/test/unit_tests/fixtures.hpp +++ b/test/unit_tests/fixtures.hpp @@ -40,7 +40,9 @@ class WithParam { public: WithParam(const std::string& param_prefix) : m_value{find_param_value(param_prefix)} {} - const std::string& get_value() { return m_value; } + const std::string& get_value() { + return m_value; + } private: static std::string find_param_value(const std::string& param_prefix) { @@ -61,14 +63,18 @@ class WithEchoExe : public WithParam { public: WithEchoExe() : WithParam{"--echo_exe="} {} - const std::string& get_echo_exe() { return get_value(); } + const std::string& get_echo_exe() { + return get_value(); + } }; class WithWorkerExe : public WithParam { public: WithWorkerExe() : WithParam{"--worker_exe="}, m_cmd{worker::Command::create()} {} - const std::string& get_worker_exe() { return get_value(); } + const std::string& get_worker_exe() { + return get_value(); + } worker::Command::Shared m_cmd; }; diff --git a/test/unit_tests/resource_ids.h b/test/unit_tests/resource_ids.h index 46046bf..5aeec99 100644 --- a/test/unit_tests/resource_ids.h +++ b/test/unit_tests/resource_ids.h @@ -1,3 +1,3 @@ -#define IDS_TEST_STRING 69 +#define IDS_TEST_STRING 69 #define IDS_TEST_STRING_WIDE 70 -#define ID_TEST_DATA 420 +#define ID_TEST_DATA 420 diff --git a/test/unit_tests/shared/command.hpp b/test/unit_tests/shared/command.hpp index a24370a..95fd0d6 100644 --- a/test/unit_tests/shared/command.hpp +++ b/test/unit_tests/shared/command.hpp @@ -62,8 +62,13 @@ public: using ReadResult = std::function; using ProcessAction = std::function; - static Shared create() { return Shared::create(COMMAND_SHMEM_NAME); } - static Shared open() { return Shared::open(COMMAND_SHMEM_NAME); } + static Shared create() { + return Shared::create(COMMAND_SHMEM_NAME); + } + + static Shared open() { + return Shared::open(COMMAND_SHMEM_NAME); + } void get_result(Action action, const SetArgs& set_args, const ReadResult& read_result) { { diff --git a/test/unit_tests/shared/console.hpp b/test/unit_tests/shared/console.hpp index 55907c2..86a317a 100644 --- a/test/unit_tests/shared/console.hpp +++ b/test/unit_tests/shared/console.hpp @@ -32,15 +32,25 @@ public: Buffer(winapi::Handle&& handle) : m_handle{std::move(handle)}, m_info{get_info(m_handle)} {} - int16_t get_columns() const { return m_info.dwSize.X; } + int16_t get_columns() const { + return m_info.dwSize.X; + } - int16_t get_lines() const { return m_info.dwSize.Y; } + int16_t get_lines() const { + return m_info.dwSize.Y; + } - int16_t get_cursor_column() const { return m_info.dwCursorPosition.X; } + int16_t get_cursor_column() const { + return m_info.dwCursorPosition.X; + } - int16_t get_cursor_line() const { return m_info.dwCursorPosition.Y; } + int16_t get_cursor_line() const { + return m_info.dwCursorPosition.Y; + } - void update() { m_info = get_info(m_handle); } + void update() { + m_info = get_info(m_handle); + } /* * This is a stupid little function to read the console screen buffer. @@ -121,9 +131,13 @@ public: return read_lines(-static_cast(numof_lines), -1); } - std::string read_last_line() const { return read_lines(-1, -1)[0]; } + std::string read_last_line() const { + return read_lines(-1, -1)[0]; + } - std::string read_line(int16_t n) const { return read_lines(n, n)[0]; } + std::string read_line(int16_t n) const { + return read_lines(n, n)[0]; + } private: static Info get_info(const winapi::Handle& handle) { -- cgit v1.3