From 86c7d079bbb2e846eb2a924fb741c43693f50f20 Mon Sep 17 00:00:00 2001 From: Joachim Wuttke <j.wuttke@fz-juelich.de> Date: Mon, 16 Oct 2023 18:43:06 +0200 Subject: [PATCH] SimulationAreaTest: rm unused var; inline vars --- Tests/Unit/Device/SimulationAreaTest.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Tests/Unit/Device/SimulationAreaTest.cpp b/Tests/Unit/Device/SimulationAreaTest.cpp index 85230aba0b8..2d08b65e4a5 100644 --- a/Tests/Unit/Device/SimulationAreaTest.cpp +++ b/Tests/Unit/Device/SimulationAreaTest.cpp @@ -112,15 +112,12 @@ TEST(SimulationAreaTest, indexInRoi) detector.setRegionOfInterest(0.1, 1.1, 2.9, 3.9); detector.addMask(Rectangle(-0.9, 0.1, 0.9, 1.9), true); - std::vector<size_t> expectedDetectorIndexes = {6, 7, 9, 10, 11, 13, 14, 15}; - std::vector<size_t> expectedRoi = {1, 2, 3, 4, 5, 6, 7, 8}; - std::vector<size_t> indexes; std::vector<size_t> roiIndexes; std::vector<size_t> detectorIndexes; detector.iterateOverNonMaskedPoints([&](const auto it) { roiIndexes.push_back(it.roiIndex()); detectorIndexes.push_back(it.detectorIndex()); }); - EXPECT_EQ(roiIndexes, expectedRoi); - EXPECT_EQ(detectorIndexes, expectedDetectorIndexes); + EXPECT_EQ(roiIndexes, std::vector<size_t>({1, 2, 3, 4, 5, 6, 7, 8})); + EXPECT_EQ(detectorIndexes, std::vector<size_t>({6, 7, 9, 10, 11, 13, 14, 15})); } -- GitLab