Skip to content
Snippets Groups Projects
Commit 48287bdf authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

SphericalDetectorTest w/o SimulationAreaIterator

parent b45c04e1
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !2042. Comments created here will be created in the context of that merge request.
......@@ -4,7 +4,6 @@
#include "Base/Axis/Scale.h"
#include "Base/Const/Units.h"
#include "Device/Beam/Beam.h"
#include "Device/Detector/SimulationAreaIterator.h"
#include "Device/Mask/MaskStack.h"
#include "Device/Mask/Polygon.h"
#include "Device/Mask/Rectangle.h"
......@@ -111,10 +110,7 @@ TEST(SphericalDetectorTest, Clone)
detector.setDetectorResolution(
ConvolutionDetectorResolution(ResolutionFunction2DGaussian(1, 1)));
std::vector<size_t> indexes1;
detector.iterateOverNonMaskedPoints(
[&](const auto it) { indexes1.push_back(it.detectorIndex()); });
EXPECT_EQ(indexes1, std::vector<size_t>({8, 9, 10, 13, 14, 15}));
std::vector<size_t> indexes1 = detector.activeIndices();
std::unique_ptr<SphericalDetector> clone(detector.clone());
......@@ -127,8 +123,6 @@ TEST(SphericalDetectorTest, Clone)
EXPECT_EQ(data.axis(1).max(), 2.9 * Units::deg);
// checking iteration over the map of cloned detector
std::vector<size_t> indexes2;
clone->iterateOverNonMaskedPoints(
[&](const auto it) { indexes2.push_back(it.detectorIndex()); });
std::vector<size_t> indexes2 = detector.activeIndices();
EXPECT_EQ(indexes2, indexes1);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment