diff options
| author | Stefan Boberg <[email protected]> | 2025-03-06 17:35:39 +0100 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2025-03-06 17:35:39 +0100 |
| commit | b044289e3c8fbc4eb4ffa5c1d96da51aa0a41f9b (patch) | |
| tree | a511dd945c87415fb5389e6579299095e3f3afc8 /src/zenserver-test/zenserver-test.cpp | |
| parent | switched std::vector -> eastl::vector (diff) | |
| download | zen-sb/eastl.tar.xz zen-sb/eastl.zip | |
std::span -> eastl::spansb/eastl
Diffstat (limited to 'src/zenserver-test/zenserver-test.cpp')
| -rw-r--r-- | src/zenserver-test/zenserver-test.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/zenserver-test/zenserver-test.cpp b/src/zenserver-test/zenserver-test.cpp index 0dbe2cb4b..b635aaa5e 100644 --- a/src/zenserver-test/zenserver-test.cpp +++ b/src/zenserver-test/zenserver-test.cpp @@ -40,11 +40,11 @@ ZEN_THIRD_PARTY_INCLUDES_START #undef GetObject ZEN_THIRD_PARTY_INCLUDES_END +#include <EASTL/span.h> #include <atomic> #include <filesystem> #include <map> #include <random> -#include <span> #include <thread> #include <typeindex> #include <unordered_map> @@ -554,7 +554,7 @@ namespace utils { return New(Port, fmt::format("--debug --upstream-thread-count=0 --upstream-zen-url=http://localhost:{}", UpstreamPort)); } - static ZenConfig NewWithThreadedUpstreams(uint16_t NewPort, std::span<uint16_t> UpstreamPorts, bool Debug) + static ZenConfig NewWithThreadedUpstreams(uint16_t NewPort, eastl::span<uint16_t> UpstreamPorts, bool Debug) { std::string Args = Debug ? "--debug" : ""; for (uint16_t Port : UpstreamPorts) @@ -598,7 +598,7 @@ namespace utils { return Value; }; - eastl::vector<std::pair<Oid, CompressedBuffer>> CreateAttachments(const std::span<const size_t>& Sizes) + eastl::vector<std::pair<Oid, CompressedBuffer>> CreateAttachments(const eastl::span<const size_t>& Sizes) { eastl::vector<std::pair<Oid, CompressedBuffer>> Result; Result.reserve(Sizes.size()); @@ -610,7 +610,7 @@ namespace utils { return Result; } - eastl::vector<std::pair<Oid, CompressedBuffer>> CreateSemiRandomAttachments(const std::span<const size_t>& Sizes) + eastl::vector<std::pair<Oid, CompressedBuffer>> CreateSemiRandomAttachments(const eastl::span<const size_t>& Sizes) { eastl::vector<std::pair<Oid, CompressedBuffer>> Result; Result.reserve(Sizes.size()); @@ -746,8 +746,8 @@ TEST_CASE("zcache.cbpackage") }; auto IsEqual = [](zen::CbPackage Lhs, zen::CbPackage Rhs) -> bool { - std::span<const zen::CbAttachment> LhsAttachments = Lhs.GetAttachments(); - std::span<const zen::CbAttachment> RhsAttachments = Rhs.GetAttachments(); + eastl::span<const zen::CbAttachment> LhsAttachments = Lhs.GetAttachments(); + eastl::span<const zen::CbAttachment> RhsAttachments = Rhs.GetAttachments(); if (LhsAttachments.size() != RhsAttachments.size()) { @@ -1332,12 +1332,12 @@ TEST_CASE("zcache.rpc") bool Success; }; - auto GetCacheRecords = [](std::string_view BaseUri, - std::string_view Namespace, - std::span<zen::CacheKey> Keys, - zen::CachePolicy Policy, - zen::RpcAcceptOptions AcceptOptions = zen::RpcAcceptOptions::kNone, - int Pid = 0) -> GetCacheRecordResult { + auto GetCacheRecords = [](std::string_view BaseUri, + std::string_view Namespace, + eastl::span<zen::CacheKey> Keys, + zen::CachePolicy Policy, + zen::RpcAcceptOptions AcceptOptions = zen::RpcAcceptOptions::kNone, + int Pid = 0) -> GetCacheRecordResult { cacherequests::GetCacheRecordsRequest Request = {.AcceptMagic = kCbPkgMagic, .AcceptOptions = static_cast<uint16_t>(AcceptOptions), .ProcessPid = Pid, @@ -1732,10 +1732,10 @@ TEST_CASE("zcache.failing.upstream") bool Success = false; }; - auto GetCacheRecords = [](std::string_view BaseUri, - std::string_view Namespace, - std::span<zen::CacheKey> Keys, - zen::CachePolicy Policy) -> GetCacheRecordResult { + auto GetCacheRecords = [](std::string_view BaseUri, + std::string_view Namespace, + eastl::span<zen::CacheKey> Keys, + zen::CachePolicy Policy) -> GetCacheRecordResult { cacherequests::GetCacheRecordsRequest Request = {.AcceptMagic = kCbPkgMagic, .DefaultPolicy = Policy, .Namespace = std::string(Namespace)}; @@ -2751,7 +2751,7 @@ OidAsString(const Oid& Id) } CbPackage -CreateOplogPackage(const Oid& Id, const std::span<const std::pair<Oid, CompressedBuffer>>& Attachments) +CreateOplogPackage(const Oid& Id, const eastl::span<const std::pair<Oid, CompressedBuffer>>& Attachments) { CbPackage Package; CbObjectWriter Object; |