From bc39ecc0385dd7e0cb9e1df84628e4c6dde34ab5 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Tue, 27 Aug 2024 11:14:38 +0200 Subject: Reformat code to comply with clang-format 18 ... while keeping our .clang-format file. --- test/buildtool/file_system/file_root.test.cpp | 3 +- .../file_system/file_system_manager.test.cpp | 67 ++++++++++++++++------ test/buildtool/file_system/git_repo.test.cpp | 3 +- test/buildtool/file_system/git_tree.test.cpp | 3 +- test/buildtool/file_system/object_cas.test.cpp | 3 +- .../file_system/resolve_symlinks_map.test.cpp | 3 +- 6 files changed, 60 insertions(+), 22 deletions(-) (limited to 'test/buildtool/file_system') diff --git a/test/buildtool/file_system/file_root.test.cpp b/test/buildtool/file_system/file_root.test.cpp index 8fbb0d95..67fd77f3 100644 --- a/test/buildtool/file_system/file_root.test.cpp +++ b/test/buildtool/file_system/file_root.test.cpp @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "src/buildtool/file_system/file_root.hpp" + #include #include #include @@ -21,7 +23,6 @@ #include "catch2/catch_test_macros.hpp" #include "src/buildtool/common/artifact_description.hpp" -#include "src/buildtool/file_system/file_root.hpp" #include "src/buildtool/file_system/file_system_manager.hpp" #include "test/utils/container_matchers.hpp" #include "test/utils/shell_quoting.hpp" diff --git a/test/buildtool/file_system/file_system_manager.test.cpp b/test/buildtool/file_system/file_system_manager.test.cpp index 05fef390..689dd9b1 100644 --- a/test/buildtool/file_system/file_system_manager.test.cpp +++ b/test/buildtool/file_system/file_system_manager.test.cpp @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "src/buildtool/file_system/file_system_manager.hpp" + #include #include #include @@ -23,7 +25,6 @@ #include "catch2/catch_test_macros.hpp" #include "catch2/generators/catch_generators_all.hpp" -#include "src/buildtool/file_system/file_system_manager.hpp" #include "src/buildtool/file_system/object_type.hpp" #include "src/buildtool/logging/log_level.hpp" #include "src/buildtool/logging/logger.hpp" @@ -352,8 +353,12 @@ TEST_CASE_METHOD(CopyFileFixture, "CopyFile", "[file_system]") { CHECK(content_from == content_to); }; - SECTION("direct") { run_test(false); } - SECTION("fd_less") { run_test(true); } + SECTION("direct") { + run_test(false); + } + SECTION("fd_less") { + run_test(true); + } } TEST_CASE_METHOD(CopyFileFixture, "CopyFileAs", "[file_system]") { @@ -381,8 +386,12 @@ TEST_CASE_METHOD(CopyFileFixture, "CopyFileAs", "[file_system]") { } }; - SECTION("direct") { run_test(false); } - SECTION("fd_less") { run_test(true); } + SECTION("direct") { + run_test(false); + } + SECTION("fd_less") { + run_test(true); + } SECTION("direct with epoch") { run_test.template operator()(false); } @@ -415,8 +424,12 @@ TEST_CASE_METHOD(CopyFileFixture, "CopyFileAs", "[file_system]") { } }; - SECTION("direct") { run_test(false); } - SECTION("fd_less") { run_test(true); } + SECTION("direct") { + run_test(false); + } + SECTION("fd_less") { + run_test(true); + } SECTION("direct with epoch") { run_test.template operator()(false); } @@ -447,8 +460,12 @@ TEST_CASE_METHOD(CopyFileFixture, "CopyFileAs", "[file_system]") { } }; - SECTION("direct") { run_test(false); } - SECTION("fd_less") { run_test(true); } + SECTION("direct") { + run_test(false); + } + SECTION("fd_less") { + run_test(true); + } SECTION("direct with epoch") { run_test.template operator()(false); } @@ -480,8 +497,12 @@ TEST_CASE_METHOD(CopyFileFixture, "CopyFileAs", "[file_system]") { } }; - SECTION("direct") { run_test(false); } - SECTION("fd_less") { run_test(true); } + SECTION("direct") { + run_test(false); + } + SECTION("fd_less") { + run_test(true); + } SECTION("direct with epoch") { run_test.template operator()(false); } @@ -535,8 +556,12 @@ TEST_CASE_METHOD(WriteFileFixture, "WriteFile", "[file_system]") { CHECK(written_content == content); }; - SECTION("direct") { run_test(false); } - SECTION("fd-less") { run_test(true); } + SECTION("direct") { + run_test(false); + } + SECTION("fd-less") { + run_test(true); + } } TEST_CASE_METHOD(WriteFileFixture, "WriteFileAs", "[file_system]") { @@ -562,8 +587,12 @@ TEST_CASE_METHOD(WriteFileFixture, "WriteFileAs", "[file_system]") { } }; - SECTION("direct") { run_test(false); } - SECTION("fd-less") { run_test(true); } + SECTION("direct") { + run_test(false); + } + SECTION("fd-less") { + run_test(true); + } SECTION("direct with epoch") { run_test.template operator()(false); } @@ -592,8 +621,12 @@ TEST_CASE_METHOD(WriteFileFixture, "WriteFileAs", "[file_system]") { } }; - SECTION("direct") { run_test(false); } - SECTION("fd-less") { run_test(true); } + SECTION("direct") { + run_test(false); + } + SECTION("fd-less") { + run_test(true); + } SECTION("direct with epoch") { run_test.template operator()(false); } diff --git a/test/buildtool/file_system/git_repo.test.cpp b/test/buildtool/file_system/git_repo.test.cpp index 5a0831cc..2663e9bd 100644 --- a/test/buildtool/file_system/git_repo.test.cpp +++ b/test/buildtool/file_system/git_repo.test.cpp @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "src/buildtool/file_system/git_repo.hpp" + #include #include #include @@ -26,7 +28,6 @@ #include "nlohmann/json.hpp" #include "src/buildtool/file_system/file_system_manager.hpp" #include "src/buildtool/file_system/git_cas.hpp" -#include "src/buildtool/file_system/git_repo.hpp" #include "src/buildtool/logging/log_level.hpp" #include "src/buildtool/logging/logger.hpp" #include "src/buildtool/storage/config.hpp" diff --git a/test/buildtool/file_system/git_tree.test.cpp b/test/buildtool/file_system/git_tree.test.cpp index 82177b45..2cef0e00 100644 --- a/test/buildtool/file_system/git_tree.test.cpp +++ b/test/buildtool/file_system/git_tree.test.cpp @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "src/buildtool/file_system/git_tree.hpp" + #include #include #include @@ -27,7 +29,6 @@ #include "src/buildtool/file_system/file_system_manager.hpp" #include "src/buildtool/file_system/git_cas.hpp" #include "src/buildtool/file_system/git_repo.hpp" -#include "src/buildtool/file_system/git_tree.hpp" #include "src/utils/cpp/hex_string.hpp" #include "test/utils/container_matchers.hpp" #include "test/utils/shell_quoting.hpp" diff --git a/test/buildtool/file_system/object_cas.test.cpp b/test/buildtool/file_system/object_cas.test.cpp index a8fd746b..e9ebf580 100644 --- a/test/buildtool/file_system/object_cas.test.cpp +++ b/test/buildtool/file_system/object_cas.test.cpp @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "src/buildtool/file_system/object_cas.hpp" + #include // std::equal_to #include @@ -19,7 +21,6 @@ #include "src/buildtool/common/artifact_digest.hpp" #include "src/buildtool/common/bazel_types.hpp" #include "src/buildtool/file_system/file_system_manager.hpp" -#include "src/buildtool/file_system/object_cas.hpp" #include "src/buildtool/file_system/object_type.hpp" #include "src/buildtool/storage/config.hpp" #include "test/utils/hermeticity/test_storage_config.hpp" diff --git a/test/buildtool/file_system/resolve_symlinks_map.test.cpp b/test/buildtool/file_system/resolve_symlinks_map.test.cpp index 2cf05ead..d1cd7692 100644 --- a/test/buildtool/file_system/resolve_symlinks_map.test.cpp +++ b/test/buildtool/file_system/resolve_symlinks_map.test.cpp @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "src/buildtool/file_system/symlinks_map/resolve_symlinks_map.hpp" + #include #include #include @@ -27,7 +29,6 @@ #include "src/buildtool/file_system/git_repo.hpp" #include "src/buildtool/file_system/object_type.hpp" #include "src/buildtool/file_system/symlinks_map/pragma_special.hpp" -#include "src/buildtool/file_system/symlinks_map/resolve_symlinks_map.hpp" #include "src/buildtool/multithreading/task_system.hpp" #include "test/utils/shell_quoting.hpp" -- cgit v1.2.3