36 #include <gtest/gtest.h> 42 #include "std_msgs/String.h" 47 void callback(
const std_msgs::String::ConstPtr& msg)
49 EXPECT_STREQ(
expect_what.c_str(), msg->data.c_str());
71 main(
int argc,
char** argv)
76 std::cout <<
"Will look for string \"" <<
expect_what <<
"\" on topic " <<
on_topic <<
"\n";
78 testing::InitGoogleTest(&argc, argv);
82 return RUN_ALL_TESTS();
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
int main(int argc, char **argv)
void callback(const std_msgs::String::ConstPtr &msg)
ROSCPP_DECL void spinOnce()