Skip to content

Commit ed42a58

Browse files
committed
DPL: more validation of MessageSet::header / payload replacement
1 parent d1a5e60 commit ed42a58

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Framework/Core/test/test_MessageSet.cxx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,14 @@ TEST_CASE("GetHeaderPayloadOperators")
250250
auto& pl1 = msgSet.messages | get_payload{1, 0};
251251
REQUIRE(pl1.get() != nullptr);
252252
REQUIRE(pl1->GetSize() == 200);
253+
254+
// Validate pipe operators match old API
255+
for (size_t i = 0; i < 2; ++i) {
256+
REQUIRE(&(msgSet.messages | get_header{i}) == &msgSet.header(i));
257+
REQUIRE(&(msgSet.messages | get_payload{i, 0}) == &msgSet.payload(i, 0));
258+
}
259+
REQUIRE((msgSet.messages | count_parts{}) == msgSet.messageMap.size());
260+
REQUIRE((msgSet.messages | count_payloads{}) == msgSet.pairMap.size());
253261
}
254262

255263
TEST_CASE("GetHeaderPayloadMultiPayload")

0 commit comments

Comments
 (0)