friend_test macro

This commit is contained in:
2025-06-12 17:46:10 +02:00
parent cfe7c31fe4
commit 75f63607fc
8 changed files with 61 additions and 18 deletions

View File

@@ -148,6 +148,7 @@ RawMasterFile RawFile::master() const { return m_master; }
*/
void RawFile::find_geometry() {
m_geometry.reserve(n_modules());
for (size_t col = 0; col < m_master.geometry().col;
col += m_master.udp_interfaces_per_module().col)
for (size_t row = 0; row < m_master.geometry().row;

View File

@@ -7,6 +7,7 @@
#include <filesystem>
#include "test_config.hpp"
#include "test_macros.hpp"
using aare::File;
using aare::RawFile;
@@ -184,7 +185,8 @@ struct TestParameters {
const DetectorGeometry geometry{};
};
TEST_CASE("check find_geometry", "[.integration][.files][.rawfile]") {
TEST_CASE_PRIVATE(aare, check_find_geometry, "check find_geometry",
"[.integration][.files][.rawfile]") {
auto test_parameters = GENERATE(
TestParameters{
@@ -223,9 +225,11 @@ TEST_CASE("check find_geometry", "[.integration][.files][.rawfile]") {
REQUIRE(std::filesystem::exists(fpath));
RawFileTestWrapper f(fpath, "r");
RawFile f(fpath, "r");
auto geometry = f.get_geometry();
f.find_geometry();
auto geometry = f.m_geometry;
CHECK(geometry.modules_x == test_parameters.geometry.modules_x);
CHECK(geometry.modules_y == test_parameters.geometry.modules_y);
@@ -257,6 +261,8 @@ TEST_CASE("check find_geometry", "[.integration][.files][.rawfile]") {
}
}
} // close the namespace
TEST_CASE("Open multi module file with ROI",
"[.integration][.files][.rawfile]") {