diff --git a/tests/unit/serialization/test_serialize_messenger.cc b/tests/unit/serialization/test_serialize_messenger.cc index c66bff5a1d..df85d7b801 100644 --- a/tests/unit/serialization/test_serialize_messenger.cc +++ b/tests/unit/serialization/test_serialize_messenger.cc @@ -98,6 +98,15 @@ static void myDataMsgHan(MyDataMsg* msg) { msg->check(); } +static void myDataHan(std::vector const& vec) { + int i = 0; + EXPECT_EQ(vec.size(), 100ull); + for (auto&& x : vec) { + EXPECT_EQ(x, i); + i++; + } +} + struct TestSerialMessenger : TestParallelHarness { using TestMsg = TestStaticBytesShortMsg<4>; }; @@ -115,6 +124,15 @@ TEST_F(TestSerialMessenger, test_serial_messenger_1) { } } +TEST_F(TestSerialMessenger, test_serial_messenger_2) { + auto const& this_node = theContext()->getNode(); + std::vector vec; + for (int i = 0; i < 100; i++) { + vec.push_back(i); + } + theMsg()->send<&myDataHan>(vt::Node(this_node), vec); +} + TEST_F(TestSerialMessenger, test_serial_messenger_bcast_1) { auto const& my_node = theContext()->getNode();