mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-02-19 16:48:42 +01:00
friend_test macro
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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]") {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user