10 #include <gtest/gtest.h> 13 #include "../../include/mm_mux_demux/mux.hpp" 14 #include "../../include/mm_mux_demux/demux.hpp" 15 #include "../../include/mm_mux_demux/publisher.hpp" 16 #include "../../include/mm_mux_demux/subscriber.hpp" 46 TEST(MessageMuxDemux,pubsub) {
52 ecl::MilliSleep()(200);
54 ecl::MilliSleep()(500);
55 EXPECT_EQ(std::string(
"dude"), foo.
foo_msg);
59 int main(
int argc,
char **argv)
61 testing::InitGoogleTest(&argc,argv);
62 return RUN_ALL_TESTS();
void publish(const unsigned int &id, const T &msg)
int main(int argc, char **argv)
static void start(const std::string &name, const std::string &url, const mm_messages::Verbosity::Level &verbosity=mm_messages::Verbosity::QUIET, const bool bind=false)
MM_REGISTER_PACKET_INFO(TestPubSub, std::string,"Foo")
void foo_cb(std::string msg)
TEST(MessageMuxDemux, pubsub)
static void start(const std::string &name, const std::string &url, const mm_messages::Verbosity::Level &verbosity=mm_messages::Verbosity::QUIET, const bool bind=true)
Pre-establish named connections.
void foo(std::string data)