diff --git a/components/core/tests/test-NetworkReader.cpp b/components/core/tests/test-NetworkReader.cpp index 5a900ced3..cd4b90cc0 100644 --- a/components/core/tests/test-NetworkReader.cpp +++ b/components/core/tests/test-NetworkReader.cpp @@ -11,6 +11,7 @@ #include #include +#include "../src/clp/Array.hpp" #include "../src/clp/CurlDownloadHandler.hpp" #include "../src/clp/CurlGlobalInstance.hpp" #include "../src/clp/ErrorCode.hpp" @@ -65,12 +66,11 @@ auto get_test_input_path_relative_to_tests_dir() -> std::filesystem::path { auto get_content(clp::ReaderInterface& reader, size_t read_buf_size) -> std::vector { std::vector buf; - // NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays) - auto const read_buf{std::make_unique(read_buf_size)}; + clp::Array read_buf{read_buf_size}; for (bool has_more_content{true}; has_more_content;) { size_t num_bytes_read{}; - has_more_content = reader.read(read_buf.get(), read_buf_size, num_bytes_read); - std::string_view const view{read_buf.get(), num_bytes_read}; + has_more_content = reader.read(read_buf.data(), read_buf_size, num_bytes_read); + std::string_view const view{read_buf.data(), num_bytes_read}; buf.insert(buf.cend(), view.cbegin(), view.cend()); } return buf;