summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-10-08 13:25:41 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-10-08 15:41:50 +0200
commit0e024eb055e6e8272f419e898ae9eefd0085c34f (patch)
treeb88ac4fe8c728631b53c424a8dab8c5a2f1577c6 /test
parenta050cfe72b6bc02a8df2cdeefa739931983462a7 (diff)
downloadjustbuild-0e024eb055e6e8272f419e898ae9eefd0085c34f.tar.gz
Name value template parameters using kCamelCase.
Diffstat (limited to 'test')
-rw-r--r--test/buildtool/crypto/hasher.test.cpp4
-rw-r--r--test/buildtool/storage/large_object_cas.test.cpp20
2 files changed, 12 insertions, 12 deletions
diff --git a/test/buildtool/crypto/hasher.test.cpp b/test/buildtool/crypto/hasher.test.cpp
index 8414cc81..8ace48ce 100644
--- a/test/buildtool/crypto/hasher.test.cpp
+++ b/test/buildtool/crypto/hasher.test.cpp
@@ -19,9 +19,9 @@
#include "catch2/catch_test_macros.hpp"
-template <Hasher::HashType type>
+template <Hasher::HashType kType>
void test_increment_hash(std::string const& bytes, std::string const& result) {
- auto hasher = Hasher::Create(type);
+ auto hasher = Hasher::Create(kType);
REQUIRE(hasher.has_value());
hasher->Update(bytes.substr(0, bytes.size() / 2));
hasher->Update(bytes.substr(bytes.size() / 2));
diff --git a/test/buildtool/storage/large_object_cas.test.cpp b/test/buildtool/storage/large_object_cas.test.cpp
index b87c8db3..bd8fa98e 100644
--- a/test/buildtool/storage/large_object_cas.test.cpp
+++ b/test/buildtool/storage/large_object_cas.test.cpp
@@ -42,7 +42,7 @@
namespace {
namespace LargeTestUtils {
-template <bool IsExecutable>
+template <bool kIsExecutable>
class Blob final {
public:
static constexpr auto kLargeId = "bl_8Mb";
@@ -648,24 +648,24 @@ class TestFilesDirectory final {
};
namespace LargeTestUtils {
-template <bool IsExecutable>
-auto Blob<IsExecutable>::Create(LocalCAS<kDefaultDoGlobalUplink> const& cas,
- std::string const& id,
- std::uintmax_t size) noexcept
+template <bool kIsExecutable>
+auto Blob<kIsExecutable>::Create(LocalCAS<kDefaultDoGlobalUplink> const& cas,
+ std::string const& id,
+ std::uintmax_t size) noexcept
-> std::optional<std::pair<ArtifactDigest, std::filesystem::path>> {
auto path = Generate(id, size);
- auto digest = path ? cas.StoreBlob(*path, IsExecutable) : std::nullopt;
+ auto digest = path ? cas.StoreBlob(*path, kIsExecutable) : std::nullopt;
auto blob_path =
- digest ? cas.BlobPath(*digest, IsExecutable) : std::nullopt;
+ digest ? cas.BlobPath(*digest, kIsExecutable) : std::nullopt;
if (digest and blob_path) {
return std::make_pair(std::move(*digest), std::move(*blob_path));
}
return std::nullopt;
}
-template <bool IsExecutable>
-auto Blob<IsExecutable>::Generate(std::string const& id,
- std::uintmax_t size) noexcept
+template <bool kIsExecutable>
+auto Blob<kIsExecutable>::Generate(std::string const& id,
+ std::uintmax_t size) noexcept
-> std::optional<std::filesystem::path> {
std::string const path_id = "blob" + id;
auto path = TestFilesDirectory::Instance().GetPath() / path_id;