style: adjust clang-format rules (#2186)

Co-authored-by: Vithorio Polten <reach@vithor.io>
This commit is contained in:
ReenigneArcher 2025-01-19 22:34:47 -05:00 committed by GitHub
commit c2420427b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
158 changed files with 8754 additions and 9994 deletions

View file

@ -2,10 +2,10 @@
* @file tests/unit/test_file_handler.cpp
* @brief Test src/file_handler.*.
*/
#include <src/file_handler.h>
#include "../tests_common.h"
#include <src/file_handler.h>
struct FileHandlerParentDirectoryTest: testing::TestWithParam<std::tuple<std::string, std::string>> {};
TEST_P(FileHandlerParentDirectoryTest, Run) {
@ -19,7 +19,9 @@ INSTANTIATE_TEST_SUITE_P(
testing::Values(
std::make_tuple("/path/to/file.txt", "/path/to"),
std::make_tuple("/path/to/directory", "/path/to"),
std::make_tuple("/path/to/directory/", "/path/to")));
std::make_tuple("/path/to/directory/", "/path/to")
)
);
struct FileHandlerMakeDirectoryTest: testing::TestWithParam<std::tuple<std::string, bool, bool>> {};
@ -45,7 +47,9 @@ INSTANTIATE_TEST_SUITE_P(
std::make_tuple("dir_123", true, false),
std::make_tuple("dir_123", true, true),
std::make_tuple("dir_123/abc", true, false),
std::make_tuple("dir_123/abc", true, true)));
std::make_tuple("dir_123/abc", true, true)
)
);
struct FileHandlerTests: testing::TestWithParam<std::tuple<int, std::string>> {};
@ -70,7 +74,8 @@ All the streets where once was pity
Mr. Blue Sky is living here today!
Hey, hey, hey!
)") // multi-line
));
)
);
TEST_P(FileHandlerTests, WriteFileTest) {
auto [fileNum, content] = GetParam();