four_wheel_steering_wrong_config.cpp
Go to the documentation of this file.
1 
2 #include "test_common.h"
3 
4 // TEST CASES
6 {
7  // The controller should be never alive
8  int secs = 0;
9  while(!isControllerAlive() && ros::ok() && secs < 5)
10  {
11  ros::Duration(1.0).sleep();
12  secs++;
13  }
14  if (!ros::ok())
15  FAIL() << "Something went wrong while executing test.";
16  // Give up and assume controller load failure after 5 seconds
17  EXPECT_GE(secs,5);
18 }
19 
20 
21 int main(int argc, char** argv)
22 {
23  testing::InitGoogleTest(&argc, argv);
24  ros::init(argc, argv, "four_wheel_steering_wrong_config_test");
25 
27  spinner.start();
28  int ret = RUN_ALL_TESTS();
29  spinner.stop();
30  ros::shutdown();
31  return ret;
32 }
TEST_F(FourWheelSteeringControllerTest, testWrongConfig)
bool sleep() const
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
void spinner()
int main(int argc, char **argv)
ROSCPP_DECL bool ok()
ROSCPP_DECL void shutdown()


four_wheel_steering_controller
Author(s): Vincent Rousseau
autogenerated on Thu Apr 11 2019 03:08:25