Main Page
Namespaces
Classes
Files
File List
File Members
test
src
four_wheel_steering_wrong_config.cpp
Go to the documentation of this file.
1
2
#include "
test_common.h
"
3
4
// TEST CASES
5
TEST_F
(
FourWheelSteeringControllerTest
, testWrongConfig)
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
26
ros::AsyncSpinner
spinner
(1);
27
spinner.
start
();
28
int
ret = RUN_ALL_TESTS();
29
spinner.
stop
();
30
ros::shutdown
();
31
return
ret;
32
}
FourWheelSteeringControllerTest
Definition:
test_common.h:51
TEST_F
TEST_F(FourWheelSteeringControllerTest, testWrongConfig)
Definition:
four_wheel_steering_wrong_config.cpp:5
ros::Duration::sleep
bool sleep() const
ros::init
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
spinner
void spinner()
ros::AsyncSpinner::start
void start()
main
int main(int argc, char **argv)
Definition:
four_wheel_steering_wrong_config.cpp:21
ros::ok
ROSCPP_DECL bool ok()
test_common.h
ros::Duration
ros::shutdown
ROSCPP_DECL void shutdown()
ros::AsyncSpinner::stop
void stop()
ros::AsyncSpinner
four_wheel_steering_controller
Author(s): Vincent Rousseau
autogenerated on Sat Apr 18 2020 03:58:13