From 56df7b3916f669edd315808f92e63e7553367f1d Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Fri, 14 Feb 2025 13:04:28 +0100 Subject: Store HashFunction by value Although references give an additional information about ownership, they introduce additional design difficulties. --- test/buildtool/file_system/TARGETS | 1 - test/buildtool/file_system/object_cas.test.cpp | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'test/buildtool/file_system') diff --git a/test/buildtool/file_system/TARGETS b/test/buildtool/file_system/TARGETS index d8d2ddbf..d630f6bf 100644 --- a/test/buildtool/file_system/TARGETS +++ b/test/buildtool/file_system/TARGETS @@ -21,7 +21,6 @@ , "srcs": ["object_cas.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["@", "gsl", "", "gsl"] , ["@", "src", "src/buildtool/common", "artifact_digest_factory"] , ["@", "src", "src/buildtool/common", "common"] , ["@", "src", "src/buildtool/crypto", "hash_function"] 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 #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 cas{&storage_config.Get().hash_function, + ObjectCAS 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 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") { -- cgit v1.2.3