mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-11-09 20:13:54 +01:00
Improved ClusterFile API (#358)
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:
1 parent
86db375948
commit
b0875106e3
16 files changed
+1687
-308
No files matched your search
@@ -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);
|
||||
}
|
||||
Reference in new issue
Block a user