1
0
Fork 0

add loopback test for OSC #bundle

This commit is contained in:
Kevin Matz 2023-05-16 08:44:10 -04:00
parent 4fa70b4ff2
commit 1d2a3b7941
1 changed files with 9 additions and 0 deletions

View File

@ -363,4 +363,13 @@ TEST(OSC, loopback)
tx.send(message2);
ASSERT_EQ(hits.size(), 1) << "method hit mismatch";
EXPECT_STREQ(hits.front().c_str(), "/foo") << "method address mismatch";
hits.clear();
auto bundle = std::make_shared<OSC::Bundle>();
bundle->elements.push_back(message1);
bundle->elements.push_back(message2);
tx.send(bundle);
ASSERT_EQ(hits.size(), 2) << "bundle hits mismatch";
EXPECT_STREQ(hits.front().c_str(), "/oscillator/4/frequency") << "bundle method 1 address mismatch";
EXPECT_STREQ(hits.back().c_str(), "/foo") << "bundle method 2 address mismatch";
}