diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2025-02-14 13:04:28 +0100 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2025-02-19 17:50:30 +0100 |
commit | 56df7b3916f669edd315808f92e63e7553367f1d (patch) | |
tree | 93a269402da87f33a9e95f82e540f6fef667aa6b /test/buildtool/file_system/object_cas.test.cpp | |
parent | 888573c86e2eff6d1657f42955c388cda347680d (diff) | |
download | justbuild-56df7b3916f669edd315808f92e63e7553367f1d.tar.gz |
Store HashFunction by value
Although references give an additional information about ownership, they introduce additional design difficulties.
Diffstat (limited to 'test/buildtool/file_system/object_cas.test.cpp')
-rw-r--r-- | test/buildtool/file_system/object_cas.test.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/buildtool/file_system/object_cas.test.cpp b/test/buildtool/file_system/object_cas.test.cpp index 44cea6bb..fa11fb17 100644 --- a/test/buildtool/file_system/object_cas.test.cpp +++ b/test/buildtool/file_system/object_cas.test.cpp @@ -19,7 +19,6 @@ #include <string> #include "catch2/catch_test_macros.hpp" -#include "gsl/gsl" #include "src/buildtool/common/artifact_digest.hpp" #include "src/buildtool/common/artifact_digest_factory.hpp" #include "src/buildtool/crypto/hash_function.hpp" @@ -37,7 +36,7 @@ TEST_CASE("ObjectCAS", "[file_system]") { storage_config.Get().hash_function, test_content); SECTION("CAS for files") { - ObjectCAS<ObjectType::File> cas{&storage_config.Get().hash_function, + ObjectCAS<ObjectType::File> cas{storage_config.Get().hash_function, gen_config.cas_f}; CHECK(not cas.BlobPath(test_digest)); @@ -77,7 +76,7 @@ TEST_CASE("ObjectCAS", "[file_system]") { SECTION("CAS for executables") { ObjectCAS<ObjectType::Executable> cas{ - &storage_config.Get().hash_function, gen_config.cas_x}; + storage_config.Get().hash_function, gen_config.cas_x}; CHECK(not cas.BlobPath(test_digest)); SECTION("Add blob from bytes and verify") { |