diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-08-27 11:14:38 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-08-27 11:40:40 +0200 |
commit | bc39ecc0385dd7e0cb9e1df84628e4c6dde34ab5 (patch) | |
tree | 4556b3f5f5898ef56316fc1612a04402b79903ef /test/buildtool/common | |
parent | 340f3478dc2bffe1a75496e5c120e88274fee698 (diff) | |
download | justbuild-bc39ecc0385dd7e0cb9e1df84628e4c6dde34ab5.tar.gz |
Reformat code to comply with clang-format 18
... while keeping our .clang-format file.
Diffstat (limited to 'test/buildtool/common')
-rw-r--r-- | test/buildtool/common/action_description.test.cpp | 3 | ||||
-rw-r--r-- | test/buildtool/common/artifact_description.test.cpp | 7 | ||||
-rw-r--r-- | test/buildtool/common/repository_config.test.cpp | 7 |
3 files changed, 10 insertions, 7 deletions
diff --git a/test/buildtool/common/action_description.test.cpp b/test/buildtool/common/action_description.test.cpp index c79caeaa..eab2cc48 100644 --- a/test/buildtool/common/action_description.test.cpp +++ b/test/buildtool/common/action_description.test.cpp @@ -12,12 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "src/buildtool/common/action_description.hpp" + #include <filesystem> #include "catch2/catch_test_macros.hpp" #include "nlohmann/json.hpp" #include "src/buildtool/common/action.hpp" -#include "src/buildtool/common/action_description.hpp" #include "src/buildtool/common/artifact_description.hpp" TEST_CASE("From JSON", "[action_description]") { diff --git a/test/buildtool/common/artifact_description.test.cpp b/test/buildtool/common/artifact_description.test.cpp index 76e49e34..c6d3a8d5 100644 --- a/test/buildtool/common/artifact_description.test.cpp +++ b/test/buildtool/common/artifact_description.test.cpp @@ -12,17 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "src/buildtool/common/artifact_description.hpp" + #include <filesystem> #include <string> #include "catch2/catch_test_macros.hpp" #include "nlohmann/json.hpp" #include "src/buildtool/common/artifact.hpp" -#include "src/buildtool/common/artifact_description.hpp" #include "src/buildtool/file_system/object_type.hpp" -[[nodiscard]] auto operator==(Artifact const& lhs, Artifact const& rhs) - -> bool { +[[nodiscard]] auto operator==(Artifact const& lhs, + Artifact const& rhs) -> bool { return lhs.Id() == rhs.Id() and lhs.FilePath() == rhs.FilePath() and lhs.Info() == rhs.Info(); } diff --git a/test/buildtool/common/repository_config.test.cpp b/test/buildtool/common/repository_config.test.cpp index 4fd8362b..931ead30 100644 --- a/test/buildtool/common/repository_config.test.cpp +++ b/test/buildtool/common/repository_config.test.cpp @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "src/buildtool/common/repository_config.hpp" + #include <atomic> #include <cstddef> #include <filesystem> @@ -24,7 +26,6 @@ #include "catch2/catch_test_macros.hpp" #include "nlohmann/json.hpp" #include "src/buildtool/common/artifact_digest.hpp" -#include "src/buildtool/common/repository_config.hpp" #include "src/buildtool/file_system/file_root.hpp" #include "src/buildtool/file_system/file_system_manager.hpp" #include "src/buildtool/storage/config.hpp" @@ -86,8 +87,8 @@ template <class T> } // Read graph from CAS -[[nodiscard]] auto ReadGraph(Storage const& storage, std::string const& hash) - -> nlohmann::json { +[[nodiscard]] auto ReadGraph(Storage const& storage, + std::string const& hash) -> nlohmann::json { auto const& cas = storage.CAS(); auto blob = cas.BlobPath( ArtifactDigest{hash, /*does not matter*/ 0, /*is_tree=*/false}, |