9 #include <boost/test/unit_test.hpp>
19 #include <unordered_set>
23 BOOST_AUTO_TEST_SUITE(Digitization)
34 std::vector<Channel1D> channels = {{{cell0}, 1., {5}},
39 BOOST_CHECK_EQUAL(channels.size(), 4
u);
41 BOOST_CHECK_EQUAL(mergedChannels.size(), 3
u);
43 std::unordered_set<unsigned int> mergedLinks = {5, 6};
45 for (
const auto& ch : mergedChannels) {
46 if (ch.cellId[0].first == 5) {
50 BOOST_CHECK_EQUAL(ch.links.size(), 2
u);
51 BOOST_CHECK(ch.links == mergedLinks);
69 std::vector<Channel2D> channels = {{{cell00, cell10}, 1., {5}},
70 {{cell01, cell11}, 1., {5}},
71 {{cell02, cell12}, 1., {5}},
72 {{cell01, cell11}, 0.5, {6}}};
74 BOOST_CHECK_EQUAL(channels.size(), 4
u);
76 BOOST_CHECK_EQUAL(mergedChannels.size(), 3
u);
78 std::unordered_set<unsigned int> mergedLinks = {5, 6};
80 for (
const auto& ch : mergedChannels) {
81 if (ch.cellId[0].first == 6) {
85 BOOST_CHECK_EQUAL(ch.links.size(), 2
u);
86 BOOST_CHECK(ch.links == mergedLinks);
91 BOOST_AUTO_TEST_SUITE_END()