diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-23 12:26:54 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-08-30 17:17:09 +0200 |
commit | 0ba7060660fdcf095556be0e2837cb785ccdea9d (patch) | |
tree | 51aa9cf17ba1f0bb6bb262d81f3f9e76fddf354a /test/buildtool/file_system | |
parent | dd12fcb5eea5970ac8ef6acd7a200c1e92ce81ea (diff) | |
download | justbuild-0ba7060660fdcf095556be0e2837cb785ccdea9d.tar.gz |
Replace bazel_re::Digest in ObjectCAS
...with ArtifactDigest.
Diffstat (limited to 'test/buildtool/file_system')
-rw-r--r-- | test/buildtool/file_system/TARGETS | 1 | ||||
-rw-r--r-- | test/buildtool/file_system/object_cas.test.cpp | 11 |
2 files changed, 5 insertions, 7 deletions
diff --git a/test/buildtool/file_system/TARGETS b/test/buildtool/file_system/TARGETS index baa886f0..a9632e48 100644 --- a/test/buildtool/file_system/TARGETS +++ b/test/buildtool/file_system/TARGETS @@ -23,7 +23,6 @@ , ["@", "src", "src/buildtool/file_system", "file_system_manager"] , ["@", "src", "src/buildtool/file_system", "object_cas"] , ["@", "src", "src/buildtool/file_system", "object_type"] - , ["@", "src", "src/buildtool/common", "bazel_types"] , ["@", "src", "src/buildtool/common", "common"] , ["@", "src", "src/buildtool/storage", "config"] , ["utils", "test_storage_config"] diff --git a/test/buildtool/file_system/object_cas.test.cpp b/test/buildtool/file_system/object_cas.test.cpp index e9ebf580..58e011a0 100644 --- a/test/buildtool/file_system/object_cas.test.cpp +++ b/test/buildtool/file_system/object_cas.test.cpp @@ -14,12 +14,11 @@ #include "src/buildtool/file_system/object_cas.hpp" -#include <functional> // std::equal_to +#include <optional> // has_value() #include <string> #include "catch2/catch_test_macros.hpp" #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_type.hpp" #include "src/buildtool/storage/config.hpp" @@ -42,7 +41,7 @@ TEST_CASE("ObjectCAS", "[file_system]") { // add blob auto cas_digest = cas.StoreBlobFromBytes(test_content); CHECK(cas_digest); - CHECK(std::equal_to<bazel_re::Digest>{}(*cas_digest, test_digest)); + CHECK(*cas_digest == test_digest); // verify blob auto blob_path = cas.BlobPath(*cas_digest); @@ -60,7 +59,7 @@ TEST_CASE("ObjectCAS", "[file_system]") { // add blob auto cas_digest = cas.StoreBlobFromFile("tmp/test"); CHECK(cas_digest); - CHECK(std::equal_to<bazel_re::Digest>{}(*cas_digest, test_digest)); + CHECK(*cas_digest == test_digest); // verify blob auto blob_path = cas.BlobPath(*cas_digest); @@ -81,7 +80,7 @@ TEST_CASE("ObjectCAS", "[file_system]") { // add blob auto cas_digest = cas.StoreBlobFromBytes(test_content); CHECK(cas_digest); - CHECK(std::equal_to<bazel_re::Digest>{}(*cas_digest, test_digest)); + CHECK(*cas_digest == test_digest); // verify blob auto blob_path = cas.BlobPath(*cas_digest); @@ -99,7 +98,7 @@ TEST_CASE("ObjectCAS", "[file_system]") { // add blob auto cas_digest = cas.StoreBlobFromFile("tmp/test"); CHECK(cas_digest); - CHECK(std::equal_to<bazel_re::Digest>{}(*cas_digest, test_digest)); + CHECK(*cas_digest == test_digest); // verify blob auto blob_path = cas.BlobPath(*cas_digest); |