30 #include <gtest/gtest.h> 34 #include <test_roscpp/TestEmpty.h> 36 #define ASSERT_THROWS(expr) \ 42 catch (std::exception& e) \ 44 ROS_INFO("Caught exception: %s", e.what());\ 47 void callback(
const test_roscpp::TestEmptyConstPtr&)
52 TEST(ParameterValidation, subscribeEmptyMD5Sum)
61 TEST(ParameterValidation, subscribeEmptyDataType)
70 TEST(ParameterValidation, subscribeNoCallback)
77 TEST(ParameterValidation, advertiseEmptyMD5Sum)
84 TEST(ParameterValidation, advertiseEmptyDataType)
91 TEST(ParameterValidation, advertiseStarMD5Sum)
98 TEST(ParameterValidation, advertiseStarDataType)
105 int main(
int argc,
char** argv)
107 testing::InitGoogleTest(&argc, argv);
108 ros::init(argc, argv,
"parameter_validation");
112 return RUN_ALL_TESTS();
void callback(const test_roscpp::TestEmptyConstPtr &)
int main(int argc, char **argv)
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)
TEST(ParameterValidation, subscribeEmptyMD5Sum)
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
#define ASSERT_THROWS(expr)
void init(const std::string &_topic, uint32_t _queue_size, const boost::function< void(const boost::shared_ptr< M const > &)> &_callback, const boost::function< boost::shared_ptr< M >(void)> &factory_fn=DefaultMessageCreator< M >())