diff --git a/tests/read_frame.h b/tests/read_frame.h index 07f91e8d0..626708819 100644 --- a/tests/read_frame.h +++ b/tests/read_frame.h @@ -71,11 +71,11 @@ void checkVecMemSubsetColl(const podio::Frame& event) { ASSERT(subsetColl[0] == origColl[0], "subset coll does not have the right contents"); } -void checkComponentUserDataColl(const podio::Frame& event) { +void checkComponentUserDataColl(const podio::Frame& event, int i) { const auto& coll = event.get>("componentUserData"); ASSERT(coll.isValid(), "componentUserData should be present"); ASSERT(coll.size() == 2, "componentUserData should have two elements"); - ASSERT(coll[1].x == 42 && coll[1].y == 123, "componentUserData contents are not as expected"); + ASSERT(coll[1].x == 42 && coll[1].y == i, "componentUserData contents are not as expected"); } template @@ -134,6 +134,9 @@ int read_frames(const std::string& filename, bool assertBuildVersion = true) { if (reader.currentFileVersion() >= podio::version::Version{0, 16, 99}) { checkVecMemSubsetColl(otherFrame); } + if (reader.currentFileVersion() >= podio::version::Version{0, 17, 99}) { + checkComponentUserDataColl(otherFrame, i + 100); + } } if (reader.readNextEntry(podio::Category::Event)) { diff --git a/tests/write_frame.h b/tests/write_frame.h index 4cf8c5a38..4a464c15e 100644 --- a/tests/write_frame.h +++ b/tests/write_frame.h @@ -290,7 +290,7 @@ auto createComponentUserDataCollection(int i) { auto val = ex2::NamespaceStruct{}; val.x = 42; - val.y = 123; + val.y = i; coll.push_back(val); return coll;