Improved ClusterFile API (#358)
Build on RHEL9 / build (push) Successful in 2m49s
Build on RHEL8 / build (push) Successful in 3m23s
Run tests using data on local RHEL8 / build (push) Successful in 4m23s
Build on local RHEL8 / build (push) Successful in 3m5s

Improved API for ClusterFile

- read_frame now returns a std::optional<ClusterVector> to differentiate
between an empty frame and end of file
- f.frames() produces an iterator over frames
- f.chunks() produces an iterator reading chunks of clusters
This commit is contained in:
Erik Fröjdh authored and GitHub committed 2026-09-14 16:01:25 +02:00
1 parent 86db375948
commit b0875106e3
16 files changed
+1687 -308

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: MPL-2.0
#include "aare/FilePtr.hpp"
#include <catch2/catch_test_macros.hpp>
#include <utility>
TEST_CASE("FilePtr converts to its open state", "[FilePtr]") {
aare::FilePtr empty;
CHECK_FALSE(empty);
aare::FilePtr open(__FILE__, "rb");
CHECK(open);
aare::FilePtr moved(std::move(open));
CHECK(moved);
CHECK_FALSE(open);
}