mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-10-22 15:01:28 +02:00
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
19 lines
382 B
C++
19 lines
382 B
C++
// 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);
|
|
}
|