summaryrefslogtreecommitdiff
path: root/test/buildtool/file_system
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2025-02-14 13:04:28 +0100
committerMaksim Denisov <denisov.maksim@huawei.com>2025-02-19 17:50:30 +0100
commit56df7b3916f669edd315808f92e63e7553367f1d (patch)
tree93a269402da87f33a9e95f82e540f6fef667aa6b /test/buildtool/file_system
parent888573c86e2eff6d1657f42955c388cda347680d (diff)
downloadjustbuild-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')
-rw-r--r--test/buildtool/file_system/TARGETS1
-rw-r--r--test/buildtool/file_system/object_cas.test.cpp5
2 files changed, 2 insertions, 4 deletions
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 <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") {